Skip to contentSkip to conversation

brcmfmac: make the read-only array pktflags static const

PATCH In review Colin Ian King 2 participants 2 messages Mar 7, 2022 – Mar 10, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 brcmfmac: make the read-only array pktflags static const

Don't populate the read-only array pktflags on the stack but instead make it static const. Also makes the object code a little smaller.

---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +1 -1
index b2fb9fcacdc9..f0ad1e23f3c8 100644
@@ -4623,7 +4623,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_cfg80211_vif *vif, s32 pktflag,
 
 s32 brcmf_vif_clear_mgmt_ies(struct brcmf_cfg80211_vif *vif)
 {
-	s32 pktflags[] = {
+	static const s32 pktflags[] = {
 		BRCMF_VNDR_IE_PRBREQ_FLAG,
 		BRCMF_VNDR_IE_PRBRSP_FLAG,
 		BRCMF_VNDR_IE_BEACON_FLAG
Signature · 1 line
2.35.1
#1 lore raw
Quoted 5 lines · Colin Ian King

Don't populate the read-only array pktflags on the stack but instead make it static const. Also makes the object code a little smaller.

Patch applied to wireless-next.git, thanks.

2386f64ceb33 brcmfmac: make the read-only array pktflags static const

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches