2023-12-06 13:05:17

by Julia Lawall

[permalink] [raw]
Subject: 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) (fwd)

Hello,

Please check on whether the array of size 1 is supposed to be a flexible
array, ie [].

julia

---------- Forwarded message ----------
Date: Wed, 6 Dec 2023 20:18:15 +0800
From: kernel test robot <[email protected]>
To: [email protected]
Cc: [email protected], Julia Lawall <[email protected]>
Subject: 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: [email protected]
CC: [email protected]
CC: [email protected]
TO: Wright Feng <[email protected]>
CC: Kalle Valo <[email protected]>
CC: "Chi-hsien Lin" <[email protected]>
CC: Ian Lin <[email protected]>

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bee0e7762ad2c6025b9f5245c040fcc36ef2bde8
commit: 6c04deae1438e5df59fc4848795248fc34961f51 brcmfmac: Add dump_survey cfg80211 ops for HostApd AutoChannelSelection
date: 1 year, 2 months ago
:::::: branch date: 2 days ago
:::::: commit date: 1 year, 2 months ago
config: csky-randconfig-r053-20231201 (https://download.01.org/0day-ci/archive/20231206/[email protected]/config)
compiler: csky-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231206/[email protected]/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 <[email protected]>
| Reported-by: Julia Lawall <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

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://github.com/intel/lkp-tests/wiki