Please check whether a flexible array would be more appropriate. Note that this will have an impact on the ability to use sizeof with the structure. julia ---------- Forwarded message ---------- Date: Sun, 20 Nov 2022 10:10:00 +0800 From: kernel test robot To: oe-kbuild@lists.linux.dev Cc: lkp@intel.com, Julia Lawall Subject: [linux-next:master 444/8929] drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:116:6-9: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length- and-one-element-arrays) BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev CC: Linux Memory Management List TO: Wright Feng CC: Kalle Valo CC: "Chi-hsien Lin" CC: Ian Lin tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 147307c69ba4441ee90c1f8ce8edf5df4ea60f67 commit: 6c04deae1438e5df59fc4848795248fc34961f51 [444/8929] brcmfmac: Add dump_survey cfg80211 ops for HostApd AutoChannelSelection :::::: branch date: 2 days ago :::::: commit date: 7 weeks ago config: sh-randconfig-c034-20221120 compiler: sh4-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Reported-by: Julia Lawall cocci warnings: (new ones prefixed by >>) >> drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:116:6-9: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) vim +116 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 6c04deae1438e5 Wright Feng 2022-09-28 112 6c04deae1438e5 Wright Feng 2022-09-28 113 struct cca_stats_n_flags { 6c04deae1438e5 Wright Feng 2022-09-28 114 u32 msrmnt_time; /* Time for Measurement (msec) */ 6c04deae1438e5 Wright Feng 2022-09-28 115 u32 msrmnt_done; /* flag set when measurement complete */ 6c04deae1438e5 Wright Feng 2022-09-28 @116 char buf[1]; 6c04deae1438e5 Wright Feng 2022-09-28 117 }; 6c04deae1438e5 Wright Feng 2022-09-28 118 -- 0-DAY CI Kernel Test Service https://01.org/lkp