[gustavoars:testing/wfamnae-next20240710-cbc 1/13] arch/powerpc/include/asm/hvcall.h:697:48: error: structure containing a flexible array member is not at the end of another structure

From: kernel test robot
Date: Fri Jul 12 2024 - 00:17:53 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/wfamnae-next20240710-cbc
head: 811bc7260e24cf06adefdbf8debb2a83d213e02d
commit: d692eacf807861f523e66bd7d1c60f5dc254f4c6 [1/13] Makefile: Enable -Wflex-array-member-not-at-end globally
:::::: branch date: 2 hours ago
:::::: commit date: 15 hours ago
config: powerpc64-randconfig-001-20240711 (https://download.01.org/0day-ci/archive/20240712/202407120418.bob8U4Yb-lkp@xxxxxxxxx/config)
compiler: powerpc64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240712/202407120418.bob8U4Yb-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/r/202407120418.bob8U4Yb-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from arch/powerpc/include/asm/book3s/64/tlbflush-radix.h:5,
from arch/powerpc/include/asm/book3s/64/radix.h:18,
from arch/powerpc/include/asm/book3s/64/pgtable.h:298,
from arch/powerpc/include/asm/book3s/64/mmu-hash.h:20,
from arch/powerpc/include/asm/book3s/64/mmu.h:32,
from arch/powerpc/include/asm/mmu.h:378,
from arch/powerpc/include/asm/paca.h:18,
from arch/powerpc/include/asm/current.h:13,
from include/linux/thread_info.h:23,
from include/asm-generic/preempt.h:5,
from ./arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:79,
from include/linux/spinlock.h:56,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:17,
from lib/test_bitops.c:10:
>> arch/powerpc/include/asm/hvcall.h:697:48: error: structure containing a flexible array member is not at the end of another structure [-Werror=flex-array-member-not-at-end]
697 | struct hv_get_perf_counter_info_params params;
| ^~~~~~
cc1: all warnings being treated as errors


vim +697 arch/powerpc/include/asm/hvcall.h

59562b5c33d6ff Scott Cheloha 2020-07-27 691
59562b5c33d6ff Scott Cheloha 2020-07-27 692 #define HGPCI_REQ_BUFFER_SIZE 4096
59562b5c33d6ff Scott Cheloha 2020-07-27 693 #define HGPCI_MAX_DATA_BYTES \
59562b5c33d6ff Scott Cheloha 2020-07-27 694 (HGPCI_REQ_BUFFER_SIZE - sizeof(struct hv_get_perf_counter_info_params))
59562b5c33d6ff Scott Cheloha 2020-07-27 695
59562b5c33d6ff Scott Cheloha 2020-07-27 696 struct hv_gpci_request_buffer {
59562b5c33d6ff Scott Cheloha 2020-07-27 @697 struct hv_get_perf_counter_info_params params;
59562b5c33d6ff Scott Cheloha 2020-07-27 698 uint8_t bytes[HGPCI_MAX_DATA_BYTES];
59562b5c33d6ff Scott Cheloha 2020-07-27 699 } __packed;
59562b5c33d6ff Scott Cheloha 2020-07-27 700

:::::: The code at line 697 was first introduced by commit
:::::: 59562b5c33d6ff3685509ed58b2ed3c5b5712704 powerpc/perf: consolidate GPCI hcall structs into asm/hvcall.h

:::::: TO: Scott Cheloha <cheloha@xxxxxxxxxxxxx>
:::::: CC: Michael Ellerman <mpe@xxxxxxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki