Staging: rtl8192e: Sparse warning regarding variable declaration

Message ID 20240228072553.11740-1-arielsilver77@gmail.com
State New
Headers
Series Staging: rtl8192e: Sparse warning regarding variable declaration |

Commit Message

Ariel Silver Feb. 28, 2024, 7:25 a.m. UTC
  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.

Signed-off-by: Ariel Silver <arielsilver77@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Philipp Hortmann Feb. 28, 2024, 8:54 p.m. UTC | #1
On 2/28/24 08:25, Ariel Silver wrote:
> 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.
> 

Hi Ariel,

please use checkpatch to check your patch:

File Nr: 0    Patch: ../../../Downloads/20240228-[PATCH] Staging_ 
rtl8192e_ Sparse warning regarding variable declaration-14757.txt
WARNING: A patch subject line should describe the change not the tool 
that found it
#1:
Subject: [PATCH] Staging: rtl8192e: Sparse warning regarding variable 
declaration

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit 
description?)
#7:
Fixed sparse warning: "'dm_rx_path_sel_table' was not declared. Should 
it be static?"

total: 0 errors, 2 warnings, 0 checks, 8 lines checked

Please make a v2 with change description under the "---"

Thanks for your support.

Bye Philipp
  

Patch

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 92143c50c149..850ee6ae1f02 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -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-----------------------------*/