Re: [PATCH v3 16/17] nvmet: New NVMe PCI endpoint target driver

kernel test robot
2024-12-16T21:06:03Z

Hi Damien,

kernel test robot noticed the following build warnings:

[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.13-rc3 next-20241216]
[cannot apply to hch-configfs/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Damien-Le-Moal/nvmet-Add-vendor_id-and-subsys_vendor_id-subsystem-attributes/20241210-174321
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20241210093408.105867-17-dlemoal%40kernel.org
patch subject: [PATCH v3 16/17] nvmet: New NVMe PCI endpoint target driver
config: i386-randconfig-003-20241217 (https://download.01.org/0day-ci/archive/20241217/202412170432.ZuybGalF-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241217/202412170432.ZuybGalF-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412170432.ZuybGalF-lkp@intel.com/

All warnings (new ones prefixed by >>):

drivers/nvme/target/pci-ep.c: In function 'nvmet_pciep_iod_name':
drivers/nvme/target/pci-ep.c:658:16: error: implicit declaration of function 'nvme_opcode_str'; did you mean 'nvme_opcode_name'? [-Werror=implicit-function-declaration]
658 | return nvme_opcode_str(iod->sq->qid, iod->cmd.common.opcode);
| ^~~~~~~~~~~~~~~
| nvme_opcode_name
>> drivers/nvme/target/pci-ep.c:658:16: warning: returning 'int' from a function with return type 'const char *' makes pointer from integer without a cast [-Wint-conversion]
658 | return nvme_opcode_str(iod->sq->qid, iod->cmd.common.opcode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bits.h:7,
from include/linux/bitops.h:6,
from include/linux/log2.h:12,
from arch/x86/include/asm/div64.h:8,
from include/linux/math.h:6,
from include/linux/delay.h:12,
from drivers/nvme/target/pci-ep.c:10:
drivers/nvme/target/pci-ep.c: In function 'nvmet_pciep_enable_ctrl':
include/uapi/linux/bits.h:9:19: warning: right shift count is negative [-Wshift-count-negative]
9 | (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
| ^~
include/linux/bits.h:35:38: note: in expansion of macro '__GENMASK'
35 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/nvme/target/pci-ep.c:1842:26: note: in expansion of macro 'GENMASK'
1842 | pci_addr = acq & GENMASK(63, 12);
| ^~~~~~~
include/uapi/linux/bits.h:9:19: warning: right shift count is negative [-Wshift-count-negative]
9 | (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
| ^~
include/linux/bits.h:35:38: note: in expansion of macro '__GENMASK'
35 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/nvme/target/pci-ep.c:1852:26: note: in expansion of macro 'GENMASK'
1852 | pci_addr = asq & GENMASK(63, 12);
| ^~~~~~~
drivers/nvme/target/pci-ep.c: In function 'nvmet_pciep_init_bar':
>> include/uapi/linux/bits.h:8:31: warning: left shift count >= width of type [-Wshift-count-overflow]
8 | (((~_UL(0)) - (_UL(1) << (l)) + 1) & \
| ^~
include/linux/bits.h:35:38: note: in expansion of macro '__GENMASK'
35 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/nvme/target/pci-ep.c:1949:23: note: in expansion of macro 'GENMASK'
1949 | ctrl->cap &= ~GENMASK(35, 32);
| ^~~~~~~
include/uapi/linux/bits.h:9:19: warning: right shift count is negative [-Wshift-count-negative]
9 | (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
| ^~
include/linux/bits.h:35:38: note: in expansion of macro '__GENMASK'
35 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/nvme/target/pci-ep.c:1949:23: note: in expansion of macro 'GENMASK'
1949 | ctrl->cap &= ~GENMASK(35, 32);
| ^~~~~~~
cc1: some warnings being treated as errors

vim +658 drivers/nvme/target/pci-ep.c

655
656 static inline const char *nvmet_pciep_iod_name(struct nvmet_pciep_iod *iod)
657 {
> 658 return nvme_opcode_str(iod->sq->qid, iod->cmd.common.opcode);
659 }
660

--
0-DAY CI Kernel Test Service