brcmfmac: make the read-only array pktflags static const
authorColin Ian King <colin.i.king@gmail.com>
Mon, 7 Mar 2022 22:32:27 +0000 (22:32 +0000)
committerKalle Valo <kvalo@kernel.org>
Thu, 10 Mar 2022 16:18:58 +0000 (18:18 +0200)
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.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220307223227.165963-1-colin.i.king@gmail.com
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c

index b2fb9fc..f0ad1e2 100644 (file)
@@ -4623,7 +4623,7 @@ exit:
 
 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