Skip to contentSkip to conversation

mwifiex: make read-only array wmm_oui static const

PATCH In review Colin Ian King 2 participants 2 messages Mar 11, 2022 – Mar 16, 2022

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

PATCH 1/1 mwifiex: make read-only array wmm_oui static const

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

---
 drivers/net/wireless/marvell/mwifiex/uap_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/marvell/mwifiex/uap_cmd.c +1 -1
index 18e89777b784..630e1679c3f9 100644
@@ -389,7 +389,7 @@ mwifiex_set_wmm_params(struct mwifiex_private *priv,
 {
 	const u8 *vendor_ie;
 	const u8 *wmm_ie;
-	u8 wmm_oui[] = {0x00, 0x50, 0xf2, 0x02};
+	static const u8 wmm_oui[] = {0x00, 0x50, 0xf2, 0x02};
 
 	vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
 					    WLAN_OUI_TYPE_MICROSOFT_WMM,
Signature · 1 line
2.35.1
#1 lore raw
Quoted 5 lines · Colin Ian King

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

Patch applied to wireless-next.git, thanks.

e7d1fc0b5ff2 mwifiex: make read-only array wmm_oui static const

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

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