Hi Steven,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: da51139d17e9d53d61a9877d9042e43b85d71ee1 commit: a6a7981cbf66d4951425d33cdce6ef39206eba83 [1407/1407] Net: ethernet: Support 3snic 3s9xx network card config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250129/202501290212.Q2TSAA3o-lkp@i...) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250129/202501290212.Q2TSAA3o-lkp@i...)
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/202501290212.Q2TSAA3o-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats_api.c:492:5: warning: no previous prototype for 'sss_nic_get_io_stats_size' [-Wmissing-prototypes] 492 | u32 sss_nic_get_io_stats_size(const struct sss_nic_dev *nic_dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from arch/arm64/include/asm/bitops.h:39, from include/linux/bitops.h:20, from include/linux/kernel.h:11, from drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats_api.c:6: In function 'test_bit', inlined from 'sss_nic_add_ethtool_link_mode' at drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats_api.c:764:7:
include/asm-generic/bitops/non-atomic.h:106:27: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'u32[1]' {aka 'unsigned int[1]'} [-Warray-bounds=]
106 | return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); | ~~~~^~~~~~~~~~~~~~ drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats_api.c: In function 'sss_nic_add_ethtool_link_mode': drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats_api.c:759:40: note: object 'hw_mode' of size 4 759 | u32 hw_mode, u32 op) | ~~~~^~~~~~~
vim +106 include/asm-generic/bitops/non-atomic.h
4117b02132d1cf9 Akinobu Mita 2006-03-26 98 4117b02132d1cf9 Akinobu Mita 2006-03-26 99 /** 4117b02132d1cf9 Akinobu Mita 2006-03-26 100 * test_bit - Determine whether a bit is set 4117b02132d1cf9 Akinobu Mita 2006-03-26 101 * @nr: bit number to test 4117b02132d1cf9 Akinobu Mita 2006-03-26 102 * @addr: Address to start counting from 4117b02132d1cf9 Akinobu Mita 2006-03-26 103 */ 4117b02132d1cf9 Akinobu Mita 2006-03-26 104 static inline int test_bit(int nr, const volatile unsigned long *addr) 4117b02132d1cf9 Akinobu Mita 2006-03-26 105 { d05be13bcc6ec61 Jiri Slaby 2007-10-18 @106 return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1))); 4117b02132d1cf9 Akinobu Mita 2006-03-26 107 } 4117b02132d1cf9 Akinobu Mita 2006-03-26 108
:::::: The code at line 106 was first introduced by commit :::::: d05be13bcc6ec615fb2e9556a9b85d52800669b6 define first set of BIT* macros
:::::: TO: Jiri Slaby jirislaby@gmail.com :::::: CC: Linus Torvalds torvalds@woody.linux-foundation.org