brcmfmac: Replace one-element array with flexible-array member
PATCH 1/1 brcmfmac: Replace one-element array with flexible-array member
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct brcmf_tlv.
This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1].
This results in no differences in binary output.
--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h +1 -1
@@ -383,7 +383,7 @@ struct brcmf_cfg80211_info {struct brcmf_tlv {u8 id;u8 len; -u8 data[1 ]; +u8 data[]; };static inline struct wiphy *cfg_to_wiphy (struct brcmf_cfg80211_info *cfg)
Signature · 1 line
2.34.1
Quoted 8 lines · Gustavo A. R. Silva
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct
brcmf_tlv.This helps with the ongoing efforts to tighten the
FORTIFY_SOURCEroutines onmemcpy()and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1].
Quoted 6 lines
This results in no differences in binary output.
Signature · 1 line
Kees Cook
Re: [next] wifi: brcmfmac: Replace one-element array with flexible-array member
In reply to Gustavo A. R. SilvaQuoted 8 lines · Gustavo A. R. Silva
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct
brcmf_tlv.This helps with the ongoing efforts to tighten the
FORTIFY_SOURCEroutines onmemcpy()and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1].
Quoted 7 lines
This results in no differences in binary output.
Patch applied to wireless-next.git, thanks.
552ac55ee9bc wifi: brcmfmac: Replace one-element array with flexible-array member
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/Y9xjizhMujNEtpB4@work/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches