Skip to contentSkip to conversation

Staging: rtl8192e: Declare variable with static

PATCH In review Ariel Silver 2 participants 2 messages Mar 9, 2024 – Mar 10, 2024 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Staging: rtl8192e: Declare variable with static

Fixed sparse warning:
"'dm_rx_path_sel_table' was not declared. Should it be static?" As dm_rx_path_sel_table is used only in rtl_dm.c it should be static.

---
V2 -> V3: add patch version number and changelog
V1 -> V2: fix checkpatch.pl warnings

---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +1 -1
index 330dafd62656..5b52bc992a61 100644
@@ -144,7 +144,7 @@ const u8 dm_cck_tx_bb_gain_ch14[CCK_TX_BB_GAIN_TABLE_LEN][8] = {
 /*------------------------Define global variable-----------------------------*/
 struct dig_t dm_digtable;
 
-struct drx_path_sel dm_rx_path_sel_table;
+static struct drx_path_sel dm_rx_path_sel_table;
 /*------------------------Define global variable-----------------------------*/
 
 
Signature · 1 line
2.25.1
Tested-by on v3 1/1
#1 lore raw
Quoted 17 lines · Ariel Silver

Fixed sparse warning:
"'dm_rx_path_sel_table' was not declared. Should it be static?" As dm_rx_path_sel_table is used only in rtl_dm.c it should be static.

---
V2 -> V3: add patch version number and changelog
V1 -> V2: fix checkpatch.pl warnings

---
  drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +0 -0
index 330dafd62656..5b52bc992a61 100644

drivers/staging/rtl8192e/rtl8192e/rtl_dm.c const u8 dm_cck_tx_bb_gain_ch14[CCK_TX_BB_GAIN_TABLE_LEN][8] = { · line 150

Quoted 8 lines
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +1 -1
@@ -144,7 +144,7 @@ const u8 dm_cck_tx_bb_gain_ch14[CCK_TX_BB_GAIN_TABLE_LEN][8] = {
  /*------------------------Define global variable-----------------------------*/
  struct dig_t dm_digtable;
 
-struct drx_path_sel dm_rx_path_sel_table;
+static struct drx_path_sel dm_rx_path_sel_table;
  /*------------------------Define global variable-----------------------------*/