Re: include/linux/avf/virtchnl.h:852:33: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_cfg' is not an integer constant

From: Geert Uytterhoeven
Date: Sat May 29 2021 - 07:59:57 EST


On Sat, May 29, 2021 at 12:26 AM kernel test robot <lkp@xxxxxxxxx> wrote:
> FYI, the error/warning still remains.

Fix available for 10 days:
https://lore.kernel.org/lkml/20210519194350.1854798-1-geert@xxxxxxxxxxxxxx/

> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 5ff2756afde08b266fbb673849899fec694f39f1
> commit: 222a8ab01698148c00c271cda82d96f4e6e7b0a8 ice: Enable RSS configure for AVF
> date: 5 weeks ago
> config: m68k-randconfig-s031-20210528 (attached as .config)
> compiler: m68k-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/?id=222a8ab01698148c00c271cda82d96f4e6e7b0a8
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 222a8ab01698148c00c271cda82d96f4e6e7b0a8
> # 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=m68k
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
>
> All errors (new ones prefixed by >>):
>
> In file included from drivers/net/ethernet/intel/i40e/i40e_prototype.h:9,
> from drivers/net/ethernet/intel/i40e/i40e.h:41,
> from drivers/net/ethernet/intel/i40e/i40e_main.c:11:
> include/linux/avf/virtchnl.h:153:36: warning: division by zero [-Wdiv-by-zero]
> 153 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
> | ^
> include/linux/avf/virtchnl.h:844:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
> 844 | VIRTCHNL_CHECK_STRUCT_LEN(2312, virtchnl_proto_hdrs);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/avf/virtchnl.h:844:33: error: enumerator value for 'virtchnl_static_assert_virtchnl_proto_hdrs' is not an integer constant

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds