[net-next:master 74/126] drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:127:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 77091933e453a258bbe9ff2aeb1c8d6fc1db7ef9
commit: 77e9184869c9fb00a482357ea8eef3bd7ae3d45a [74/126] net: hns3: refactor dump bd info of debugfs
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit...
git remote add net-next https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
git fetch --no-tags net-next master
git checkout 77e9184869c9fb00a482357ea8eef3bd7ae3d45a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c: In function 'hns3_dbg_fill_content.constprop':
>> drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:127:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
127 | strncpy(pos, items[i].name, strlen(items[i].name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:125:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
125 | strncpy(pos, result[i], strlen(result[i]));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +127 drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
114
115 static void hns3_dbg_fill_content(char *content, u16 len,
116 const struct hns3_dbg_item *items,
117 const char **result, u16 size)
118 {
119 char *pos = content;
120 u16 i;
121
122 memset(content, ' ', len);
123 for (i = 0; i < size; i++) {
124 if (result)
125 strncpy(pos, result[i], strlen(result[i]));
126 else
> 127 strncpy(pos, items[i].name, strlen(items[i].name));
128
129 pos += strlen(items[i].name) + items[i].interval;
130 }
131
132 *pos++ = '\n';
133 *pos++ = '\0';
134 }
135
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[freescale-fslc:5.4-2.1.x-imx 8321/18134] drivers/spi/spi-nxp-fspi.c:1193:12: error: use of undeclared identifier 'nxp_fspi_pm_ops'; did you mean 'nxp_fspi_mem_ops'?
by kernel test robot
Hi Han,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc 5.4-2.1.x-imx
head: dc9c8a20afa50de2da8773bbabb71464c4ee9a9d
commit: 2c4cf9ce2fcf9581d6625025b76ae73f77dde922 [8321/18134] MLK-23644: spi: spi-nxp-fspi: enable runtime pm for fspi
config: x86_64-randconfig-a012-20210514 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project e475d4d69f04597c3f6c34c8ff1899bf44502a94)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/Freescale/linux-fslc/commit/2c4cf9ce2fcf9581d6625025b7...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc 5.4-2.1.x-imx
git checkout 2c4cf9ce2fcf9581d6625025b76ae73f77dde922
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/spi/spi-nxp-fspi.c:1193:12: error: use of undeclared identifier 'nxp_fspi_pm_ops'; did you mean 'nxp_fspi_mem_ops'?
.pm = &nxp_fspi_pm_ops,
^~~~~~~~~~~~~~~
nxp_fspi_mem_ops
drivers/spi/spi-nxp-fspi.c:997:44: note: 'nxp_fspi_mem_ops' declared here
static const struct spi_controller_mem_ops nxp_fspi_mem_ops = {
^
>> drivers/spi/spi-nxp-fspi.c:1193:11: error: incompatible pointer types initializing 'const struct dev_pm_ops *' with an expression of type 'const struct spi_controller_mem_ops *' [-Werror,-Wincompatible-pointer-types]
.pm = &nxp_fspi_pm_ops,
^~~~~~~~~~~~~~~~
2 errors generated.
vim +1193 drivers/spi/spi-nxp-fspi.c
a5356aef6a907c Yogesh Narayan Gaur 2019-01-15 1188
a5356aef6a907c Yogesh Narayan Gaur 2019-01-15 1189 static struct platform_driver nxp_fspi_driver = {
a5356aef6a907c Yogesh Narayan Gaur 2019-01-15 1190 .driver = {
a5356aef6a907c Yogesh Narayan Gaur 2019-01-15 1191 .name = "nxp-fspi",
a5356aef6a907c Yogesh Narayan Gaur 2019-01-15 1192 .of_match_table = nxp_fspi_dt_ids,
a5356aef6a907c Yogesh Narayan Gaur 2019-01-15 @1193 .pm = &nxp_fspi_pm_ops,
a5356aef6a907c Yogesh Narayan Gaur 2019-01-15 1194 },
a5356aef6a907c Yogesh Narayan Gaur 2019-01-15 1195 .probe = nxp_fspi_probe,
a5356aef6a907c Yogesh Narayan Gaur 2019-01-15 1196 .remove = nxp_fspi_remove,
a5356aef6a907c Yogesh Narayan Gaur 2019-01-15 1197 };
a5356aef6a907c Yogesh Narayan Gaur 2019-01-15 1198 module_platform_driver(nxp_fspi_driver);
a5356aef6a907c Yogesh Narayan Gaur 2019-01-15 1199
:::::: The code at line 1193 was first introduced by commit
:::::: a5356aef6a907c2e2aed0caaa2b88b6021394471 spi: spi-mem: Add driver for NXP FlexSPI controller
:::::: TO: Yogesh Narayan Gaur <yogeshnarayan.gaur(a)nxp.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[bvanassche:scsi-remove-request-pointer 50/50] drivers/ata/pata_falcon.c:53:45: error: 'struct scsi_cmnd' has no member named 'request'
by kernel test robot
tree: https://github.com/bvanassche/linux scsi-remove-request-pointer
head: 087cdea56c1cf240c2e64d26e9a7c3231a751f14
commit: 087cdea56c1cf240c2e64d26e9a7c3231a751f14 [50/50] core: Remove the request member from struct scsi_cmnd
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/bvanassche/linux/commit/087cdea56c1cf240c2e64d26e9a7c3...
git remote add bvanassche https://github.com/bvanassche/linux
git fetch --no-tags bvanassche scsi-remove-request-pointer
git checkout 087cdea56c1cf240c2e64d26e9a7c3231a751f14
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/ata/pata_falcon.c: In function 'pata_falcon_data_xfer':
>> drivers/ata/pata_falcon.c:53:45: error: 'struct scsi_cmnd' has no member named 'request'
53 | if (dev->class == ATA_DEV_ATA && cmd && cmd->request &&
| ^~
drivers/ata/pata_falcon.c:54:32: error: 'struct scsi_cmnd' has no member named 'request'
54 | !blk_rq_is_passthrough(cmd->request))
| ^~
vim +53 drivers/ata/pata_falcon.c
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 41
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 42 static unsigned int pata_falcon_data_xfer(struct ata_queued_cmd *qc,
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 43 unsigned char *buf,
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 44 unsigned int buflen, int rw)
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 45 {
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 46 struct ata_device *dev = qc->dev;
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 47 struct ata_port *ap = dev->link->ap;
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 48 void __iomem *data_addr = ap->ioaddr.data_addr;
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 49 unsigned int words = buflen >> 1;
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 50 struct scsi_cmnd *cmd = qc->scsicmd;
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 51 bool swap = 1;
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 52
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 @53 if (dev->class == ATA_DEV_ATA && cmd && cmd->request &&
79f4d1d5c0d7d1 Linus Torvalds 2017-02-21 54 !blk_rq_is_passthrough(cmd->request))
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 55 swap = 0;
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 56
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 57 /* Transfer multiple of 2 bytes */
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 58 if (rw == READ) {
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 59 if (swap)
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 60 raw_insw_swapw((u16 *)data_addr, (u16 *)buf, words);
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 61 else
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 62 raw_insw((u16 *)data_addr, (u16 *)buf, words);
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 63 } else {
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 64 if (swap)
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 65 raw_outsw_swapw((u16 *)data_addr, (u16 *)buf, words);
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 66 else
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 67 raw_outsw((u16 *)data_addr, (u16 *)buf, words);
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 68 }
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 69
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 70 /* Transfer trailing byte, if any. */
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 71 if (unlikely(buflen & 0x01)) {
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 72 unsigned char pad[2] = { };
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 73
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 74 /* Point buf to the tail of buffer */
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 75 buf += buflen - 1;
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 76
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 77 if (rw == READ) {
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 78 if (swap)
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 79 raw_insw_swapw((u16 *)data_addr, (u16 *)pad, 1);
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 80 else
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 81 raw_insw((u16 *)data_addr, (u16 *)pad, 1);
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 82 *buf = pad[0];
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 83 } else {
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 84 pad[0] = *buf;
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 85 if (swap)
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 86 raw_outsw_swapw((u16 *)data_addr, (u16 *)pad, 1);
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 87 else
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 88 raw_outsw((u16 *)data_addr, (u16 *)pad, 1);
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 89 }
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 90 words++;
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 91 }
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 92
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 93 return words << 1;
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 94 }
7e11aabd48eb00 Bartlomiej Zolnierkiewicz 2016-12-30 95
:::::: The code at line 53 was first introduced by commit
:::::: 7e11aabd48eb00240b280bf927cba9198664dcf6 ata: add Atari Falcon PATA controller driver
:::::: TO: Bartlomiej Zolnierkiewicz <b.zolnierkie(a)samsung.com>
:::::: CC: Tejun Heo <tj(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
arch/sh/kernel/cpu/sh3/serial-sh7720.c:16:32: sparse: sparse: incorrect type in argument 1 (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 25a1298726e97b9d25379986f5d54d9e62ad6e93
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 9 months ago
config: sh-randconfig-s032-20210515 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e5fc436f06eef54ef512ea55a9db8eb9f2e76959
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
iwyu warnings: (new ones prefixed by >>)
vim +16 arch/sh/kernel/cpu/sh3/serial-sh7720.c
61a6976bf19a6cf Paul Mundt 2011-06-14 7
61a6976bf19a6cf Paul Mundt 2011-06-14 8 static void sh7720_sci_init_pins(struct uart_port *port, unsigned int cflag)
61a6976bf19a6cf Paul Mundt 2011-06-14 9 {
61a6976bf19a6cf Paul Mundt 2011-06-14 10 unsigned short data;
61a6976bf19a6cf Paul Mundt 2011-06-14 11
61a6976bf19a6cf Paul Mundt 2011-06-14 12 if (cflag & CRTSCTS) {
61a6976bf19a6cf Paul Mundt 2011-06-14 13 /* enable RTS/CTS */
61a6976bf19a6cf Paul Mundt 2011-06-14 14 if (port->mapbase == 0xa4430000) { /* SCIF0 */
61a6976bf19a6cf Paul Mundt 2011-06-14 15 /* Clear PTCR bit 9-2; enable all scif pins but sck */
61a6976bf19a6cf Paul Mundt 2011-06-14 @16 data = __raw_readw(PORT_PTCR);
61a6976bf19a6cf Paul Mundt 2011-06-14 17 __raw_writew((data & 0xfc03), PORT_PTCR);
61a6976bf19a6cf Paul Mundt 2011-06-14 18 } else if (port->mapbase == 0xa4438000) { /* SCIF1 */
61a6976bf19a6cf Paul Mundt 2011-06-14 19 /* Clear PVCR bit 9-2 */
61a6976bf19a6cf Paul Mundt 2011-06-14 20 data = __raw_readw(PORT_PVCR);
61a6976bf19a6cf Paul Mundt 2011-06-14 21 __raw_writew((data & 0xfc03), PORT_PVCR);
61a6976bf19a6cf Paul Mundt 2011-06-14 22 }
61a6976bf19a6cf Paul Mundt 2011-06-14 23 } else {
61a6976bf19a6cf Paul Mundt 2011-06-14 24 if (port->mapbase == 0xa4430000) { /* SCIF0 */
61a6976bf19a6cf Paul Mundt 2011-06-14 25 /* Clear PTCR bit 5-2; enable only tx and rx */
61a6976bf19a6cf Paul Mundt 2011-06-14 26 data = __raw_readw(PORT_PTCR);
61a6976bf19a6cf Paul Mundt 2011-06-14 27 __raw_writew((data & 0xffc3), PORT_PTCR);
61a6976bf19a6cf Paul Mundt 2011-06-14 28 } else if (port->mapbase == 0xa4438000) { /* SCIF1 */
61a6976bf19a6cf Paul Mundt 2011-06-14 29 /* Clear PVCR bit 5-2 */
61a6976bf19a6cf Paul Mundt 2011-06-14 30 data = __raw_readw(PORT_PVCR);
61a6976bf19a6cf Paul Mundt 2011-06-14 31 __raw_writew((data & 0xffc3), PORT_PVCR);
61a6976bf19a6cf Paul Mundt 2011-06-14 32 }
61a6976bf19a6cf Paul Mundt 2011-06-14 33 }
61a6976bf19a6cf Paul Mundt 2011-06-14 34 }
61a6976bf19a6cf Paul Mundt 2011-06-14 35
:::::: The code at line 16 was first introduced by commit
:::::: 61a6976bf19a6cf5dfcf37c3536665b316f22d49 serial: sh-sci: Abstract register maps.
:::::: TO: Paul Mundt <lethal(a)linux-sh.org>
:::::: CC: Paul Mundt <lethal(a)linux-sh.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[sashal-linux-stable:queue-5.10 96/193] fs/f2fs/file.c:2919:52: error: use of undeclared identifier 'arg'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.10
head: 770ef1614992538e703bcd99000204be8338aa9d
commit: d27ceebfd8ea029a1bb0ad50faf5ffa62002cb05 [96/193] f2fs: fix compat F2FS_IOC_{MOVE,GARBAGE_COLLECT}_RANGE
config: x86_64-randconfig-b001-20210514 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 425781bce01f2f1d5f553d3b2bf9ebbd6e15068c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.10
git checkout d27ceebfd8ea029a1bb0ad50faf5ffa62002cb05
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the sashal-linux-stable/queue-5.10 HEAD 770ef1614992538e703bcd99000204be8338aa9d builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
>> fs/f2fs/file.c:2919:52: error: use of undeclared identifier 'arg'
if (copy_to_user((struct f2fs_move_range __user *)arg,
^
1 error generated.
vim +/arg +2919 fs/f2fs/file.c
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2888
d27ceebfd8ea02 Chao Yu 2020-11-10 2889 static int __f2fs_ioc_move_range(struct file *filp,
d27ceebfd8ea02 Chao Yu 2020-11-10 2890 struct f2fs_move_range *range)
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2891 {
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2892 struct fd dst;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2893 int err;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2894
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2895 if (!(filp->f_mode & FMODE_READ) ||
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2896 !(filp->f_mode & FMODE_WRITE))
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2897 return -EBADF;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2898
d27ceebfd8ea02 Chao Yu 2020-11-10 2899 dst = fdget(range->dst_fd);
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2900 if (!dst.file)
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2901 return -EBADF;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2902
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2903 if (!(dst.file->f_mode & FMODE_WRITE)) {
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2904 err = -EBADF;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2905 goto err_out;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2906 }
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2907
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2908 err = mnt_want_write_file(filp);
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2909 if (err)
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2910 goto err_out;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2911
d27ceebfd8ea02 Chao Yu 2020-11-10 2912 err = f2fs_move_file_range(filp, range->pos_in, dst.file,
d27ceebfd8ea02 Chao Yu 2020-11-10 2913 range->pos_out, range->len);
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2914
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2915 mnt_drop_write_file(filp);
3cecfa5f6700c0 Kinglong Mee 2017-03-10 2916 if (err)
3cecfa5f6700c0 Kinglong Mee 2017-03-10 2917 goto err_out;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2918
4dd6f977fc778e Jaegeuk Kim 2016-07-08 @2919 if (copy_to_user((struct f2fs_move_range __user *)arg,
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2920 &range, sizeof(range)))
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2921 err = -EFAULT;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2922 err_out:
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2923 fdput(dst);
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2924 return err;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2925 }
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2926
:::::: The code at line 2919 was first introduced by commit
:::::: 4dd6f977fc778e5a0da604e5f8cb2f36d163d27b f2fs: support an ioctl to move a range of data blocks
:::::: TO: Jaegeuk Kim <jaegeuk(a)kernel.org>
:::::: CC: Jaegeuk Kim <jaegeuk(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[chrome-os:chromeos-5.10 9126/11292] drivers/gpu/drm/nouveau/nvkm/subdev/mc/tu102.c:50:1: error: no previous prototype for 'tu102_mc_intr_unarm'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head: 2be994c1bc8af2595853df3b93e55eb46357bf4f
commit: c0b118f37e5d5f20ae8369c124961e39087075c8 [9126/11292] UPSTREAM: drm/nouveau/mc/tu102: Fix MMU fault interrupts on Turing
config: parisc-randconfig-r034-20210513 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.10
git checkout c0b118f37e5d5f20ae8369c124961e39087075c8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/nouveau/nvkm/subdev/mc/tu102.c:50:1: error: no previous prototype for 'tu102_mc_intr_unarm' [-Werror=missing-prototypes]
50 | tu102_mc_intr_unarm(struct nvkm_mc *base)
| ^~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/nouveau/nvkm/subdev/mc/tu102.c:62:1: error: no previous prototype for 'tu102_mc_intr_rearm' [-Werror=missing-prototypes]
62 | tu102_mc_intr_rearm(struct nvkm_mc *base)
| ^~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/nouveau/nvkm/subdev/mc/tu102.c:74:1: error: no previous prototype for 'tu102_mc_intr_mask' [-Werror=missing-prototypes]
74 | tu102_mc_intr_mask(struct nvkm_mc *base, u32 mask, u32 intr)
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/nouveau/nvkm/subdev/mc/tu102.c:132:1: error: no previous prototype for 'tu102_mc_new_' [-Werror=missing-prototypes]
132 | tu102_mc_new_(const struct nvkm_mc_func *func, struct nvkm_device *device,
| ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/tu102_mc_intr_unarm +50 drivers/gpu/drm/nouveau/nvkm/subdev/mc/tu102.c
48
49 void
> 50 tu102_mc_intr_unarm(struct nvkm_mc *base)
51 {
52 struct tu102_mc *mc = tu102_mc(base);
53 unsigned long flags;
54
55 spin_lock_irqsave(&mc->lock, flags);
56 mc->intr = false;
57 tu102_mc_intr_update(mc);
58 spin_unlock_irqrestore(&mc->lock, flags);
59 }
60
61 void
> 62 tu102_mc_intr_rearm(struct nvkm_mc *base)
63 {
64 struct tu102_mc *mc = tu102_mc(base);
65 unsigned long flags;
66
67 spin_lock_irqsave(&mc->lock, flags);
68 mc->intr = true;
69 tu102_mc_intr_update(mc);
70 spin_unlock_irqrestore(&mc->lock, flags);
71 }
72
73 void
> 74 tu102_mc_intr_mask(struct nvkm_mc *base, u32 mask, u32 intr)
75 {
76 struct tu102_mc *mc = tu102_mc(base);
77 unsigned long flags;
78
79 spin_lock_irqsave(&mc->lock, flags);
80 mc->mask = (mc->mask & ~mask) | intr;
81 tu102_mc_intr_update(mc);
82 spin_unlock_irqrestore(&mc->lock, flags);
83 }
84
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[sashal-linux-stable:queue-5.10 86/183] fs/f2fs/file.c:2919:52: error: 'arg' undeclared
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.10
head: 43e342905dbc3f8824e43b3a767bddc1976c3fec
commit: e45b32960b00947ecb26d7e8c059fee29233c173 [86/183] f2fs: fix compat F2FS_IOC_{MOVE,GARBAGE_COLLECT}_RANGE
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.10
git checkout e45b32960b00947ecb26d7e8c059fee29233c173
# save the attached .config to linux build tree
make W=1 W=1 ARCH=um
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the sashal-linux-stable/queue-5.10 HEAD 43e342905dbc3f8824e43b3a767bddc1976c3fec builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
fs/f2fs/file.c: In function '__f2fs_ioc_move_range':
>> fs/f2fs/file.c:2919:52: error: 'arg' undeclared (first use in this function)
2919 | if (copy_to_user((struct f2fs_move_range __user *)arg,
| ^~~
fs/f2fs/file.c:2919:52: note: each undeclared identifier is reported only once for each function it appears in
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for MFD_CORE
Depends on HAS_IOMEM
Selected by
- MFD_HI6421_SPMI && STAGING && OF && SPMI
vim +/arg +2919 fs/f2fs/file.c
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2888
e45b32960b0094 Chao Yu 2020-11-10 2889 static int __f2fs_ioc_move_range(struct file *filp,
e45b32960b0094 Chao Yu 2020-11-10 2890 struct f2fs_move_range *range)
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2891 {
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2892 struct fd dst;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2893 int err;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2894
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2895 if (!(filp->f_mode & FMODE_READ) ||
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2896 !(filp->f_mode & FMODE_WRITE))
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2897 return -EBADF;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2898
e45b32960b0094 Chao Yu 2020-11-10 2899 dst = fdget(range->dst_fd);
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2900 if (!dst.file)
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2901 return -EBADF;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2902
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2903 if (!(dst.file->f_mode & FMODE_WRITE)) {
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2904 err = -EBADF;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2905 goto err_out;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2906 }
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2907
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2908 err = mnt_want_write_file(filp);
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2909 if (err)
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2910 goto err_out;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2911
e45b32960b0094 Chao Yu 2020-11-10 2912 err = f2fs_move_file_range(filp, range->pos_in, dst.file,
e45b32960b0094 Chao Yu 2020-11-10 2913 range->pos_out, range->len);
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2914
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2915 mnt_drop_write_file(filp);
3cecfa5f6700c0 Kinglong Mee 2017-03-10 2916 if (err)
3cecfa5f6700c0 Kinglong Mee 2017-03-10 2917 goto err_out;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2918
4dd6f977fc778e Jaegeuk Kim 2016-07-08 @2919 if (copy_to_user((struct f2fs_move_range __user *)arg,
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2920 &range, sizeof(range)))
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2921 err = -EFAULT;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2922 err_out:
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2923 fdput(dst);
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2924 return err;
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2925 }
4dd6f977fc778e Jaegeuk Kim 2016-07-08 2926
:::::: The code at line 2919 was first introduced by commit
:::::: 4dd6f977fc778e5a0da604e5f8cb2f36d163d27b f2fs: support an ioctl to move a range of data blocks
:::::: TO: Jaegeuk Kim <jaegeuk(a)kernel.org>
:::::: CC: Jaegeuk Kim <jaegeuk(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
drivers/gpu/drm/i915/gvt/gtt.c:267:19: error: unused function 'get_pt_type'
by kernel test robot
Hi Nick,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 315d99318179b9cd5077ccc9f7f26a164c9fa998
commit: 9f4069b055d1508c833115df7493b6e0001e5c9b drm/i915: re-disable -Wframe-address
date: 1 year, 1 month ago
config: x86_64-randconfig-r003-20210513 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 425781bce01f2f1d5f553d3b2bf9ebbd6e15068c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 9f4069b055d1508c833115df7493b6e0001e5c9b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/i915/gvt/gtt.c:267:19: error: unused function 'get_pt_type' [-Werror,-Wunused-function]
static inline int get_pt_type(int type)
^
drivers/gpu/drm/i915/gvt/gtt.c:590:20: error: unused function 'ppgtt_set_guest_root_entry' [-Werror,-Wunused-function]
static inline void ppgtt_set_guest_root_entry(struct intel_vgpu_mm *mm,
^
2 errors generated.
vim +/get_pt_type +267 drivers/gpu/drm/i915/gvt/gtt.c
2707e44466881d Zhi Wang 2016-03-28 266
054f4eba2a2985 Zhi Wang 2017-10-10 @267 static inline int get_pt_type(int type)
054f4eba2a2985 Zhi Wang 2017-10-10 268 {
054f4eba2a2985 Zhi Wang 2017-10-10 269 return gtt_type_table[type].pt_type;
054f4eba2a2985 Zhi Wang 2017-10-10 270 }
054f4eba2a2985 Zhi Wang 2017-10-10 271
:::::: The code at line 267 was first introduced by commit
:::::: 054f4eba2a2985b1db43353b7b5ce90e96cf9bb9 drm/i915/gvt: Introduce page table type of current level in GTT type enumerations
:::::: TO: Zhi Wang <zhi.a.wang(a)intel.com>
:::::: CC: Zhenyu Wang <zhenyuw(a)linux.intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[intel-linux-intel-lts:5.4/yocto 414/1142] drivers/misc/xlink-pcie/local_host/mxlk_epf.c:60:5: sparse: sparse: symbol 'xlink_sw_id' was not declared. Should it be static?
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 792c8003efc4d75b5f52db70e7380b6a425bdba8 [414/1142] xlink-pcie: XLink PCIe Remote and Local Host driver
config: alpha-randconfig-s032-20210514 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/intel/linux-intel-lts/commit/792c8003efc4d75b5f52db70e...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 792c8003efc4d75b5f52db70e7380b6a425bdba8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
--
>> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:174:41: sparse: sparse: cast removes address space '<asn:2>' of expression
>> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:175:56: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] <asn:2> *engine_en @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:175:56: sparse: expected void [noderef] <asn:2> *engine_en
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:175:56: sparse: got unsigned int *
>> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:178:55: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] <asn:2> *int_mask @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:178:55: sparse: expected void [noderef] <asn:2> *int_mask
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:178:55: sparse: got unsigned int *
>> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:181:56: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] <asn:2> *int_clear @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:181:56: sparse: expected void [noderef] <asn:2> *int_clear
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:181:56: sparse: got unsigned int *
>> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:184:53: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] <asn:2> *ll_err @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:184:53: sparse: expected void [noderef] <asn:2> *ll_err
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:184:53: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:215:41: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:216:56: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] <asn:2> *engine_en @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:216:56: sparse: expected void [noderef] <asn:2> *engine_en
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:216:56: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:219:55: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] <asn:2> *int_mask @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:219:55: sparse: expected void [noderef] <asn:2> *int_mask
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:219:55: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:222:56: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] <asn:2> *int_clear @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:222:56: sparse: expected void [noderef] <asn:2> *int_clear
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:222:56: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:225:53: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] <asn:2> *ll_err @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:225:53: sparse: expected void [noderef] <asn:2> *ll_err
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:225:53: sparse: got unsigned int *
>> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:228:57: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] <asn:2> *arb_weight @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:228:57: sparse: expected void [noderef] <asn:2> *arb_weight
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:228:57: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:252:29: sparse: sparse: cast removes address space '<asn:2>' of expression
>> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:253:54: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] <asn:2> *addr @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:253:54: sparse: expected void [noderef] <asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:253:54: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:329:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] <asn:2> *addr @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:329:20: sparse: expected void [noderef] <asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:329:20: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:330:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] <asn:2> *addr @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:330:41: sparse: expected void [noderef] <asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:330:41: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:331:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] <asn:2> *addr @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:331:47: sparse: expected void [noderef] <asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:331:47: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:340:41: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:350:21: sparse: sparse: cast removes address space '<asn:2>' of expression
>> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:358:52: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void [noderef] <asn:2> *doorbell @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:358:52: sparse: expected void [noderef] <asn:2> *doorbell
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:358:52: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:365:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:2> *addr @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:365:31: sparse: expected void [noderef] <asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:365:31: sparse: got unsigned int *
>> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:374:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:2> *err_status @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:374:38: sparse: expected void [noderef] <asn:2> *err_status
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:374:38: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:379:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] <asn:2> *addr @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:379:20: sparse: expected void [noderef] <asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:379:20: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:394:41: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:404:21: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:412:52: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void [noderef] <asn:2> *doorbell @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:412:52: sparse: expected void [noderef] <asn:2> *doorbell
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:412:52: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:419:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:2> *addr @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:419:31: sparse: expected void [noderef] <asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:419:31: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:428:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:2> *err_status @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:428:38: sparse: expected void [noderef] <asn:2> *err_status
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:428:38: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:431:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:2> *err_status @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:431:26: sparse: expected void [noderef] <asn:2> *err_status
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:431:26: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:436:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] <asn:2> *addr @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:436:20: sparse: expected void [noderef] <asn:2> *addr
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:436:20: sparse: got unsigned int *
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:506:41: sparse: sparse: cast removes address space '<asn:2>' of expression
>> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:508:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] <asn:2> *w_engine_en @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:508:38: sparse: expected void [noderef] <asn:2> *w_engine_en
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:508:38: sparse: got unsigned int *
>> drivers/misc/xlink-pcie/local_host/mxlk_dma.c:509:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] <asn:2> *r_engine_en @@ got unsigned int * @@
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:509:38: sparse: expected void [noderef] <asn:2> *r_engine_en
drivers/misc/xlink-pcie/local_host/mxlk_dma.c:509:38: sparse: got unsigned int *
vim +/xlink_sw_id +60 drivers/misc/xlink-pcie/local_host/mxlk_epf.c
59
> 60 u32 xlink_sw_id;
61
62 static irqreturn_t mxlk_err_interrupt(int irq, void *args)
63 {
64 struct mxlk *mxlk = args;
65 struct mxlk_epf *mxlk_epf = container_of(mxlk, struct mxlk_epf, mxlk);
66 u32 val;
67
68 val = ioread32(mxlk_epf->apb_base + PCIE_REGS_PCIE_ERR_INTR_FLAGS);
69 if (val & LINK_REQ_RST_FLG)
70 mxlk_ep_dma_reset(mxlk_epf->epf);
71
72 iowrite32(val, mxlk_epf->apb_base + PCIE_REGS_PCIE_ERR_INTR_FLAGS);
73
74 return IRQ_HANDLED;
75 }
76
77 static irqreturn_t mxlk_host_interrupt(int irq, void *args)
78 {
79 struct mxlk *mxlk = args;
80 struct mxlk_epf *mxlk_epf = container_of(mxlk, struct mxlk_epf, mxlk);
81 u32 val;
82 u8 event;
83
84 val = ioread32(mxlk_epf->apb_base + PCIE_REGS_PCIE_INTR_FLAGS);
85 if (val & LBC_CII_EVENT_FLAG) {
86 iowrite32(LBC_CII_EVENT_FLAG,
87 mxlk_epf->apb_base + PCIE_REGS_PCIE_INTR_FLAGS);
88
89 event = mxlk_get_doorbell(mxlk, TO_DEVICE, DEV_EVENT);
90 if (unlikely(event != NO_OP)) {
91 mxlk_set_doorbell(mxlk, TO_DEVICE, DEV_EVENT, NO_OP);
92 if (event == REQUEST_RESET)
93 orderly_reboot();
94 return IRQ_HANDLED;
95 }
96
97 if (likely(mxlk_epf->core_irq_callback))
98 mxlk_epf->core_irq_callback(irq, mxlk);
99 }
100
101 return IRQ_HANDLED;
102 }
103
> 104 void mxlk_register_host_irq(struct mxlk *mxlk, irq_handler_t func)
105 {
106 struct mxlk_epf *mxlk_epf = container_of(mxlk, struct mxlk_epf, mxlk);
107
108 mxlk_epf->core_irq_callback = func;
109 }
110
> 111 int mxlk_raise_irq(struct mxlk *mxlk, enum mxlk_doorbell_type type)
112 {
113 struct mxlk_epf *mxlk_epf = container_of(mxlk, struct mxlk_epf, mxlk);
114 struct pci_epf *epf = mxlk_epf->epf;
115
116 mxlk_set_doorbell(mxlk, FROM_DEVICE, type, 1);
117
118 return pci_epc_raise_irq(epf->epc, epf->func_no, PCI_EPC_IRQ_MSI, 1);
119 }
120
121 static void __iomem *mxlk_epc_alloc_addr(struct pci_epc *epc,
122 phys_addr_t *phys_addr, size_t size)
123 {
124 void __iomem *virt_addr;
125 unsigned long flags;
126
127 spin_lock_irqsave(&epc->lock, flags);
128 virt_addr = pci_epc_mem_alloc_addr(epc, phys_addr, size);
129 spin_unlock_irqrestore(&epc->lock, flags);
130
131 return virt_addr;
132 }
133
134 static void mxlk_epc_free_addr(struct pci_epc *epc, phys_addr_t phys_addr,
135 void __iomem *virt_addr, size_t size)
136 {
137 unsigned long flags;
138
139 spin_lock_irqsave(&epc->lock, flags);
140 pci_epc_mem_free_addr(epc, phys_addr, virt_addr, size);
141 spin_unlock_irqrestore(&epc->lock, flags);
142 }
143
> 144 int mxlk_copy_from_host_ll(struct mxlk *mxlk, int chan, int descs_num)
145 {
146 struct mxlk_epf *mxlk_epf = container_of(mxlk, struct mxlk_epf, mxlk);
147 struct pci_epf *epf = mxlk_epf->epf;
148
149 return mxlk_ep_dma_read_ll(epf, chan, descs_num);
150 }
151
> 152 int mxlk_copy_to_host_ll(struct mxlk *mxlk, int chan, int descs_num)
153 {
154 struct mxlk_epf *mxlk_epf = container_of(mxlk, struct mxlk_epf, mxlk);
155 struct pci_epf *epf = mxlk_epf->epf;
156
157 return mxlk_ep_dma_write_ll(epf, chan, descs_num);
158 }
159
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[intel-linux-intel-lts:5.4/yocto 5/10] drivers/ptp/ptp-intel-tgpio-plat.c:234:6: warning: variable 'isgn' is used uninitialized whenever 'if' condition is false
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 5342fd3d769c58688aad5088b77b3c9f44438ef7
commit: e3b73159b8cfd2c940dd6e55702754c16f1f3923 [5/10] mfd: intel-ehl-gpio: Introduce MFD framework to PSE GPIO/TGPIO
config: x86_64-randconfig-r026-20210514 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 425781bce01f2f1d5f553d3b2bf9ebbd6e15068c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/intel/linux-intel-lts/commit/e3b73159b8cfd2c940dd6e557...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout e3b73159b8cfd2c940dd6e55702754c16f1f3923
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/ptp/ptp-intel-tgpio-plat.c:234:6: warning: variable 'isgn' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (scaled_ppm < 0) {
^~~~~~~~~~~~~~
drivers/ptp/ptp-intel-tgpio-plat.c:247:9: note: uninitialized use occurs here
reg |= isgn << 31;
^~~~
drivers/ptp/ptp-intel-tgpio-plat.c:234:2: note: remove the 'if' if its condition is always true
if (scaled_ppm < 0) {
^~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp-intel-tgpio-plat.c:229:13: note: initialize the variable 'isgn' to silence this warning
bool isgn;
^
= 0
1 warning generated.
vim +234 drivers/ptp/ptp-intel-tgpio-plat.c
223
224 static int intel_tgpio_adjfine(struct ptp_clock_info *info, long scaled_ppm)
225 {
226 struct intel_tgpio *tgpio = to_intel_tgpio(info);
227 unsigned long flags;
228 u32 reg;
229 bool isgn;
230
231 pm_runtime_get_sync(tgpio->dev->parent);
232
233 spin_lock_irqsave(&tgpio->lock, flags);
> 234 if (scaled_ppm < 0) {
235 isgn = true;
236 scaled_ppm = -scaled_ppm;
237 }
238
239 /*
240 * HW uses a 200MHz clock, meaning it has a 5ns period. Just
241 * multiply scaled_ppm by 5 to get our increment.
242 */
243 reg = 5 * scaled_ppm;
244
245 /* bit 31 is sign bit */
246 reg &= ~BIT(31);
247 reg |= isgn << 31;
248
249 intel_tgpio_writel(tgpio->base, TIMINCA_GLOBAL, reg);
250 spin_unlock_irqrestore(&tgpio->lock, flags);
251
252 pm_runtime_put(tgpio->dev->parent);
253
254 return 0;
255 }
256
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months