[gustavoars:testing/wfamnae-next20240729-cbc 8/9] include/linux/stddef.h:16:33: error: expected declaration specifiers or '...' before '__builtin_offsetof'
From: kernel test robot
Date: Tue Jul 30 2024 - 19:27:14 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/wfamnae-next20240729-cbc
head: 303f7de5e5f60dfc378b9a32a201110936b43d83
commit: d9b68641e04510cbd540f81b8ef4379e4d26e201 [8/9] scsi: fc: Avoid -Wflex-array-member-not-at-end warnings
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20240731/202407310719.KIRn0GjQ-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240731/202407310719.KIRn0GjQ-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/202407310719.KIRn0GjQ-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:6,
from include/linux/kasan-checks.h:5,
from include/asm-generic/rwonce.h:26,
from ./arch/sh/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:305,
from include/linux/export.h:5,
from drivers/scsi/libfc/fc_elsct.c:12:
>> include/linux/stddef.h:16:33: error: expected declaration specifiers or '...' before '__builtin_offsetof'
16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~
include/uapi/scsi/fc/fc_els.h:1131:15: note: in expansion of macro 'offsetof'
1131 | static_assert(offsetof(struct fc_df_desc_fpin_reg, desc_tags) == sizeof(struct fc_df_desc_fpin_reg_hdr),
| ^~~~~~~~
In file included from drivers/scsi/libfc/fc_elsct.c:16:
>> include/uapi/scsi/fc/fc_els.h:1132:15: error: expected declaration specifiers or '...' before string constant
1132 | "struct member likely outside of __struct_group()");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/stddef.h:16:33: error: expected declaration specifiers or '...' before '__builtin_offsetof'
16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~
include/uapi/scsi/fc/fc_els.h:1149:15: note: in expansion of macro 'offsetof'
1149 | static_assert(offsetof(struct fc_els_rdf, desc) == sizeof(struct fc_els_rdf_hdr),
| ^~~~~~~~
include/uapi/scsi/fc/fc_els.h:1150:15: error: expected declaration specifiers or '...' before string constant
1150 | "struct member likely outside of __struct_group()");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +16 include/linux/stddef.h
6e218287432472 Richard Knutsson 2006-09-30 14
^1da177e4c3f41 Linus Torvalds 2005-04-16 15 #undef offsetof
14e83077d55ff4 Rasmus Villemoes 2022-03-23 @16 #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
3876488444e712 Denys Vlasenko 2015-03-09 17
:::::: The code at line 16 was first introduced by commit
:::::: 14e83077d55ff4b88fe39f5e98fb8230c2ccb4fb include: drop pointless __compiler_offsetof indirection
:::::: TO: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki