]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rtlwifi: Remove set but not used variable 'rtstate'
authorzhengbin <zhengbin13@huawei.com>
Mon, 30 Sep 2019 08:54:47 +0000 (16:54 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 2 Oct 2019 04:32:50 +0000 (07:32 +0300)
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>
drivers/net/wireless/realtek/rtlwifi/ps.c

index 6a8127539ea704604ed1382af34e031e614ad7ca..cbf5f186f48bbc62927b1676d5d83d03c5d6c8ba 100644 (file)
@@ -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);