diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2020-04-16 12:50:49 +0300 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2020-05-23 06:47:21 +0300 |
commit | 65ece6de0114fc84fbc0487bf68cae91d535dd78 (patch) | |
tree | a7bbb2df681fa21a7d5a8da9e6a28aefc11a3d39 /include/linux/wireless.h | |
parent | 5757cc7c8b71d5114aca0034cee42d22e6977d19 (diff) | |
download | linux-65ece6de0114fc84fbc0487bf68cae91d535dd78.tar.xz |
virtchnl: Add missing explicit padding to structures
On e.g. m68k, the alignment of 32-bit values is only 2 bytes, leading
to the following:
./include/linux/avf/virtchnl.h:147:36: warning: division by zero [-Wdiv-by-zero]
{ virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
^
./include/linux/avf/virtchnl.h:577:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
VIRTCHNL_CHECK_STRUCT_LEN(272, virtchnl_filter);
^~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/avf/virtchnl.h:577:32: error: enumerator value for ‘virtchnl_static_assert_virtchnl_filter’ is not an integer constant
VIRTCHNL_CHECK_STRUCT_LEN(272, virtchnl_filter);
^~~~~~~~~~~~~~~
./include/linux/avf/virtchnl.h:147:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
{ virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
^
./include/linux/avf/virtchnl.h:147:36: warning: division by zero [-Wdiv-by-zero]
{ virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
^
./include/linux/avf/virtchnl.h:619:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_pf_event);
^~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/avf/virtchnl.h:619:31: error: enumerator value for ‘virtchnl_static_assert_virtchnl_pf_event’ is not an integer constant
VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_pf_event);
^~~~~~~~~~~~~~~~~
./include/linux/avf/virtchnl.h:147:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
{ virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
^
./include/linux/avf/virtchnl.h:147:36: warning: division by zero [-Wdiv-by-zero]
{ virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
^
./include/linux/avf/virtchnl.h:640:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_iwarp_qv_info);
^~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/avf/virtchnl.h:640:31: error: enumerator value for ‘virtchnl_static_assert_virtchnl_iwarp_qv_info’ is not an integer constant
VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_iwarp_qv_info);
^~~~~~~~~~~~~~~~~~~~~~
./include/linux/avf/virtchnl.h:147:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
{ virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
^
./include/linux/avf/virtchnl.h:147:36: warning: division by zero [-Wdiv-by-zero]
{ virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
^
./include/linux/avf/virtchnl.h:647:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_iwarp_qvlist_info);
^~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/avf/virtchnl.h:647:31: error: enumerator value for ‘virtchnl_static_assert_virtchnl_iwarp_qvlist_info’ is not an integer constant
VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_iwarp_qvlist_info);
^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/avf/virtchnl.h:147:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
{ virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
^
Fix this by adding explicit padding to structures with holes.
Reported-by: <noreply@ellerman.id.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'include/linux/wireless.h')
0 files changed, 0 insertions, 0 deletions