An array of size 1 at the end of a structure looks like an opportunity for a flexible array. Be sure that no one is doing a sizeof of this structure type. julia ---------- Forwarded message ---------- Date: Thu, 10 Nov 2022 08:48:05 +0800 From: kernel test robot To: oe-kbuild@lists.linux.dev Cc: lkp@intel.com, Julia Lawall Subject: [linux-next:master 448/6614] 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: 94db6b12c18d7cf7c5726dbe816c2248494a778d commit: 6c04deae1438e5df59fc4848795248fc34961f51 [448/6614] brcmfmac: Add dump_survey cfg80211 ops for HostApd AutoChannelSelection :::::: branch date: 19 hours ago :::::: commit date: 5 weeks ago config: sparc64-randconfig-c023-20221107 compiler: sparc64-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