tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 66984acf4b16f28a2cc0d5d6186b4b6bbfd92e26 commit: 010c6364261c263f01d3d7861a955f3b1c2c9156 [3124/3124] ub: ubfi: Parsing ummu node in the ubrt table config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20251109/202511092145.WGq6xLTY-lkp@i...) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251109/202511092145.WGq6xLTY-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/202511092145.WGq6xLTY-lkp@intel.com/ All error/warnings (new ones prefixed by >>):
drivers/ub/ubfi/ummu.c:24:1: error: expected member name or ';' after declaration specifiers 24 | }; | ^ drivers/ub/ubfi/ummu.c:24:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] 23 | u8 node_data[]; __counted_by(count) | int 24 | }; | ^ drivers/ub/ubfi/ummu.c:23:18: error: 'counted_by' only applies to pointers or C99 flexible array members 23 | u8 node_data[]; __counted_by(count) | ^~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:320:32: note: expanded from macro '__counted_by' 320 | # define __counted_by(member) __attribute__((__counted_by__(member))) | ^~~~~~~~~~~~~ drivers/ub/ubfi/ummu.c:23:37: warning: expected ';' at end of declaration list 23 | u8 node_data[]; __counted_by(count) | ^ | ; drivers/ub/ubfi/ummu.c:23:5: error: flexible array member 'node_data' with type 'u8[]' (aka 'unsigned char[]') is not at the end of struct 23 | u8 node_data[]; __counted_by(count) | ^ drivers/ub/ubfi/ummu.c:23:18: note: next field declaration is here 23 | u8 node_data[]; __counted_by(count) | ^ include/linux/compiler_types.h:320:32: note: expanded from macro '__counted_by' 320 | # define __counted_by(member) __attribute__((__counted_by__(member))) | ^ 1 warning and 4 errors generated. -- drivers/ub/ubfi/resv_mem.c:33:1: error: expected member name or ';' after declaration specifiers 33 | }; | ^ drivers/ub/ubfi/resv_mem.c:33:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] 32 | u8 ranges[]; __counted_by(count) | int 33 | }; | ^ drivers/ub/ubfi/resv_mem.c:32:15: error: 'counted_by' only applies to pointers or C99 flexible array members 32 | u8 ranges[]; __counted_by(count) | ^~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:320:32: note: expanded from macro '__counted_by' 320 | # define __counted_by(member) __attribute__((__counted_by__(member))) | ^~~~~~~~~~~~~ drivers/ub/ubfi/resv_mem.c:32:34: warning: expected ';' at end of declaration list 32 | u8 ranges[]; __counted_by(count) | ^ | ; drivers/ub/ubfi/resv_mem.c:32:5: error: flexible array member 'ranges' with type 'u8[]' (aka 'unsigned char[]') is not at the end of struct 32 | u8 ranges[]; __counted_by(count) | ^ drivers/ub/ubfi/resv_mem.c:32:15: note: next field declaration is here 32 | u8 ranges[]; __counted_by(count) | ^ include/linux/compiler_types.h:320:32: note: expanded from macro '__counted_by' 320 | # define __counted_by(member) __attribute__((__counted_by__(member))) | ^ 1 warning and 4 errors generated.
vim +24 drivers/ub/ubfi/ummu.c 18 19 struct ummu_sub_table { 20 struct ub_table_header header; 21 u16 count; 22 u8 reserved[6];
23 u8 node_data[]; __counted_by(count) 24 }; 25
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki