Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtlwifi: Remove set but not used variable 'rtstate'

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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

authored by

zhengbin and committed by
Kalle Valo
4010758e a2cdd074

-3
-3
drivers/net/wireless/realtek/rtlwifi/ps.c
··· 68 68 { 69 69 struct rtl_priv *rtlpriv = rtl_priv(hw); 70 70 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); 71 - enum rf_pwrstate rtstate; 72 71 bool actionallowed = false; 73 72 u16 rfwait_cnt = 0; 74 73 ··· 100 101 break; 101 102 } 102 103 } 103 - 104 - rtstate = ppsc->rfpwr_state; 105 104 106 105 switch (state_toset) { 107 106 case ERFON: