diff mbox series

[1/6] rtlwifi: Remove set but not used variable 'rtstate'

Message ID 1569833692-93288-2-git-send-email-zhengbin13@huawei.com (mailing list archive)
State Accepted
Commit 4010758eb082467509c4e95e3c0bec57b1dec3d9
Delegated to: Kalle Valo
Headers show
Series rtlwifi: Remove a bunch of set but not used variables | expand

Commit Message

Zheng Bin Sept. 30, 2019, 8:54 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/realtek/rtlwifi/ps.c: In function rtl_ps_set_rf_state:
drivers/net/wireless/realtek/rtlwifi/ps.c:71:19: warning: variable rtstate set but not used [-Wunused-but-set-variable]

It is not used since commit f1d2b4d338bf ("rtlwifi:
rtl818x: Move drivers into new realtek directory")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/net/wireless/realtek/rtlwifi/ps.c | 3 ---
 1 file changed, 3 deletions(-)

--
2.7.4

Comments

Kalle Valo Oct. 2, 2019, 4:33 a.m. UTC | #1
zhengbin <zhengbin13@huawei.com> wrote:

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/wireless/realtek/rtlwifi/ps.c: In function rtl_ps_set_rf_state:
> drivers/net/wireless/realtek/rtlwifi/ps.c:71:19: warning: variable rtstate set but not used [-Wunused-but-set-variable]
> 
> It is not used since commit f1d2b4d338bf ("rtlwifi:
> rtl818x: Move drivers into new realtek directory")
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: zhengbin <zhengbin13@huawei.com>

5 patches applied to wireless-drivers-next.git, thanks.

4010758eb082 rtlwifi: Remove set but not used variable 'rtstate'
70906d941ccd rtlwifi: Remove set but not used variables 'dataempty','hoffset'
4a26e11500b8 rtlwifi: rtl8192ee: Remove set but not used variables 'short_gi','buf_len'
533e3de41205 rtlwifi: rtl8192ee: Remove set but not used variables 'reg_ecc','reg_eac'
66070e86878c rtlwifi: rtl8723be: Remove set but not used variables 'reg_ecc','reg_eac'
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.c b/drivers/net/wireless/realtek/rtlwifi/ps.c
index 70f04c2..e13913a 100644
--- a/drivers/net/wireless/realtek/rtlwifi/ps.c
+++ b/drivers/net/wireless/realtek/rtlwifi/ps.c
@@ -68,7 +68,6 @@  static bool rtl_ps_set_rf_state(struct ieee80211_hw *hw,
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
-	enum rf_pwrstate rtstate;
 	bool actionallowed = false;
 	u16 rfwait_cnt = 0;

@@ -102,8 +101,6 @@  static bool rtl_ps_set_rf_state(struct ieee80211_hw *hw,
 		}
 	}

-	rtstate = ppsc->rfpwr_state;
-
 	switch (state_toset) {
 	case ERFON:
 		ppsc->rfoff_reason &= (~changesource);