rtlwifi: rtl8192ee: Remove set but not used variable 'cur_tx_wp'
authorzhengbin <zhengbin13@huawei.com>
Tue, 8 Oct 2019 02:01:40 +0000 (10:01 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 9 Oct 2019 08:29:09 +0000 (11:29 +0300)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c: In function rtl92ee_is_tx_desc_closed:
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c:1005:18: warning: variable cur_tx_wp set but not used [-Wunused-but-set-variable]

It is not used since commit cf54622c8076 ("rtlwifi:
cleanup the code that check whether TX ring is available")

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/rtl8192ee/trx.c

index 36a8a51..dc7b515 100644 (file)
@@ -1002,14 +1002,13 @@ bool rtl92ee_is_tx_desc_closed(struct ieee80211_hw *hw, u8 hw_queue, u16 index)
        struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[hw_queue];
 
        {
-               u16 cur_tx_rp, cur_tx_wp;
+               u16 cur_tx_rp;
                u32 tmpu32;
 
                tmpu32 =
                  rtl_read_dword(rtlpriv,
                                 get_desc_addr_fr_q_idx(hw_queue));
                cur_tx_rp = (u16)((tmpu32 >> 16) & 0x0fff);
-               cur_tx_wp = (u16)(tmpu32 & 0x0fff);
 
                /* don't need to update ring->cur_tx_wp */
                ring->cur_tx_rp = cur_tx_rp;