[PATCH 54/57] staging: rtl8723bs: hal: rtl8723b_hal_init: Mark a bunch of debug variables as __maybe_unused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixes the following W=1 kernel build warning(s):

 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c: In function ‘SetHwReg8723B’:
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3507:32: warning: variable ‘ioted’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3507:20: warning: variable ‘masked’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3507:7: warning: variable ‘input_b’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c: In function ‘GetHalDefVar8723B’:
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4072:46: warning: variable ‘lowest_rate’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4072:34: warning: variable ‘hight_rate’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4072:21: warning: variable ‘curr_tx_sgi’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4072:7: warning: variable ‘curr_tx_rate’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4071:20: warning: variable ‘rate_mask2’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4071:8: warning: variable ‘rate_mask1’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Marco Cesati <marcocesati@xxxxxxxxx>
Cc: Fabio Aiuto <fabioaiuto83@xxxxxxxxx>
Cc: Stanley@BB.SD3
Cc: linux-staging@xxxxxxxxxxxxxxx
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
---
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 4773f0dcd9819..ebed2a912dcdd 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -3348,7 +3348,8 @@ void SetHwReg8723B(struct adapter *padapter, u8 variable, u8 *val)
 	case HW_VAR_BASIC_RATE:
 	{
 		struct mlme_ext_info *mlmext_info = &padapter->mlmeextpriv.mlmext_info;
-		u16 input_b = 0, masked = 0, ioted = 0, BrateCfg = 0;
+		u16 __maybe_unused input_b = 0, __maybe_unused masked = 0;
+		u16 __maybe_unused ioted = 0, BrateCfg = 0;
 		u16 rrsr_2g_force_mask = (RRSR_11M|RRSR_5_5M|RRSR_1M);
 		u16 rrsr_2g_allow_mask = (RRSR_24M|RRSR_12M|RRSR_6M|RRSR_CCK_RATES);
 
@@ -3894,8 +3895,9 @@ u8 GetHalDefVar8723B(struct adapter *padapter, enum hal_def_variable variable, v
 			u8 mac_id = *(u8 *)pval;
 			u32 cmd;
 			u32 ra_info1, ra_info2;
-			u32 rate_mask1, rate_mask2;
-			u8 curr_tx_rate, curr_tx_sgi, hight_rate, lowest_rate;
+			u32 __maybe_unused rate_mask1, __maybe_unused rate_mask2;
+			u8 __maybe_unused curr_tx_rate, __maybe_unused curr_tx_sgi;
+			u8 __maybe_unused hight_rate, __maybe_unused lowest_rate;
 
 			cmd = 0x40000100 | mac_id;
 			rtw_write32(padapter, REG_HMEBOX_DBG_2_8723B, cmd);
-- 
2.27.0





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux