Skip to contentSkip to conversation

staging: rtl8723bs: constify _action_public_str array

PATCH In review Tanjim Kamal 2 participants 2 messages Jan 28 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: constify _action_public_str array

This array is never modified. Add a second const to make the array itself be placed in read-only .rodata instead of just the strings it points to.

Fix a WARNING issued by scripts/checkpatch.pl.

---
 drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +1 -1
index 92b12a13d..febc14de6 100644
@@ -1139,7 +1139,7 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *act
 	return true;
 }
 
-static const char *_action_public_str[] = {
+static const char * const _action_public_str[] = {
 	"ACT_PUB_BSSCOEXIST",
 	"ACT_PUB_DSE_ENABLE",
 	"ACT_PUB_DSE_DEENABLE",
Signature · 1 line
2.47.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Tanjim Kamal

This array is never modified. Add a second const to make the array itself be placed in read-only .rodata instead of just the strings it points to.

Fix a WARNING issued by scripts/checkpatch.pl.

Quoted 28 lines · Tanjim Kamal

This array is never modified. Add a second const to make the array itself be placed in read-only .rodata instead of just the strings it points to.

Fix a WARNING issued by scripts/checkpatch.pl.

---
 drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +1 -2
index 92b12a13d..febc14de6 100644
@@ -1139,7 +1139,7 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *act
        return true;
 }
 
-static const char *_action_public_str[] = {
+static const char * const _action_public_str[] = {
        "ACT_PUB_BSSCOEXIST",
        "ACT_PUB_DSE_ENABLE",
        "ACT_PUB_DSE_DEENABLE",
--

2.47.3