include/linux/avf/virtchnl.h:375:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_irq_map_info' is not an integer constant
From: kernel test robot
Date: Tue Dec 12 2023 - 19:48:21 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cf52eed70e555e864120cfaf280e979e2a035c66
commit: f962396ce29244d9a64f241481fa73fa370404c3 ARM: davinci: support multiplatform build for ARM v5
date: 4 years, 3 months ago
config: arm-buildonly-randconfig-r001-20210929 (https://download.01.org/0day-ci/archive/20231213/202312130828.maqZjLW4-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231213/202312130828.maqZjLW4-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312130828.maqZjLW4-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
In file included from drivers/net/ethernet/intel/iavf/iavf.h:38,
from drivers/net/ethernet/intel/iavf/iavf_main.c:4:
include/linux/avf/virtchnl.h:147:43: warning: division by zero [-Wdiv-by-zero]
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:375:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
375 | VIRTCHNL_CHECK_STRUCT_LEN(14, virtchnl_irq_map_info);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:375:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_irq_map_info' is not an integer constant
375 | VIRTCHNL_CHECK_STRUCT_LEN(14, virtchnl_irq_map_info);
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:147:60: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:147:43: warning: division by zero [-Wdiv-by-zero]
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:441:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
441 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_vlan_filter_list);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:441:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_vlan_filter_list' is not an integer constant
441 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_vlan_filter_list);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:147:60: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:147:43: warning: division by zero [-Wdiv-by-zero]
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:481:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
481 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_key);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:481:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_key' is not an integer constant
481 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_key);
| ^~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:147:60: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:147:43: warning: division by zero [-Wdiv-by-zero]
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:489:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
489 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:489:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_lut' is not an integer constant
489 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut);
| ^~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:147:60: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
drivers/net/ethernet/intel/iavf/iavf_main.c:151:6: warning: no previous prototype for 'iavf_debug_d' [-Wmissing-prototypes]
151 | void iavf_debug_d(void *hw, u32 mask, char *fmt_str, ...)
| ^~~~~~~~~~~~
drivers/net/ethernet/intel/iavf/iavf_main.c: In function 'iavf_debug_d':
drivers/net/ethernet/intel/iavf/iavf_main.c:160:9: warning: function 'iavf_debug_d' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
160 | vsnprintf(buf, sizeof(buf), fmt_str, argptr);
| ^~~~~~~~~
--
In file included from drivers/net/ethernet/intel/iavf/iavf.h:38,
from drivers/net/ethernet/intel/iavf/iavf_ethtool.c:5:
include/linux/avf/virtchnl.h:147:43: warning: division by zero [-Wdiv-by-zero]
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:375:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
375 | VIRTCHNL_CHECK_STRUCT_LEN(14, virtchnl_irq_map_info);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:375:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_irq_map_info' is not an integer constant
375 | VIRTCHNL_CHECK_STRUCT_LEN(14, virtchnl_irq_map_info);
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:147:60: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:147:43: warning: division by zero [-Wdiv-by-zero]
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:441:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
441 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_vlan_filter_list);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:441:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_vlan_filter_list' is not an integer constant
441 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_vlan_filter_list);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:147:60: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:147:43: warning: division by zero [-Wdiv-by-zero]
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:481:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
481 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_key);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:481:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_key' is not an integer constant
481 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_key);
| ^~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:147:60: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:147:43: warning: division by zero [-Wdiv-by-zero]
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:489:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
489 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:489:30: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_lut' is not an integer constant
489 | VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut);
| ^~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:147:60: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
147 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
vim +/virtchnl_static_assert_virtchnl_irq_map_info +375 include/linux/avf/virtchnl.h
62683ab51e487f drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h Greg Rose 2013-12-21 374
73556269aab30c include/linux/avf/virtchnl.h Sridhar Samudrala 2017-05-11 @375 VIRTCHNL_CHECK_STRUCT_LEN(14, virtchnl_irq_map_info);
73556269aab30c include/linux/avf/virtchnl.h Sridhar Samudrala 2017-05-11 376
:::::: The code at line 375 was first introduced by commit
:::::: 73556269aab30c39cba9cf8efafc402d0deb87b2 virtchnl: Add compile time static asserts to validate structure sizes
:::::: TO: Sridhar Samudrala <sridhar.samudrala@xxxxxxxxx>
:::::: CC: Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki