]> git.baikalelectronics.ru Git - kernel.git/commitdiff
rtlwifi: btcoex: Remove set but not used variable 'len' and 'asso_type_v2'
authorYueHaibing <yuehaibing@huawei.com>
Sat, 25 May 2019 14:46:34 +0000 (22:46 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 28 May 2019 12:37:35 +0000 (15:37 +0300)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c: In function rtl_btc_btmpinfo_notify:
drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c:319:17: warning: variable len set but not used [-Wunused-but-set-variable]
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c: In function exhalbtc_connect_notify:
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:1581:16: warning: variable asso_type_v2 set but not used [-Wunused-but-set-variable]

'len' is never used since commit 624ad5a97cfe ("rtlwifi:
Add BT_MP_INFO to c2h handler.") so can be removed.

'asso_type_v2' is not used since introduction in
commit 0561ca5dd7d5 ("rtlwifi: btcoex: add assoc
type v2 to connection notify")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c

index 2ac0481b29ef1ac137e5112621f79ac4fd392929..041326e6dd2fe57e278f136126f160d20ac2ad3d 100644 (file)
@@ -1578,7 +1578,7 @@ void exhalbtc_scan_notify_wifi_only(struct wifi_only_cfg *wifionly_cfg,
 
 void exhalbtc_connect_notify(struct btc_coexist *btcoexist, u8 action)
 {
-       u8 asso_type, asso_type_v2;
+       u8 asso_type;
        bool wifi_under_5g;
 
        if (!halbtc_is_bt_coexist_available(btcoexist))
@@ -1589,15 +1589,10 @@ void exhalbtc_connect_notify(struct btc_coexist *btcoexist, u8 action)
 
        btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_5G, &wifi_under_5g);
 
-       if (action) {
+       if (action)
                asso_type = BTC_ASSOCIATE_START;
-               asso_type_v2 = wifi_under_5g ? BTC_ASSOCIATE_5G_START :
-                                              BTC_ASSOCIATE_START;
-       } else {
+       else
                asso_type = BTC_ASSOCIATE_FINISH;
-               asso_type_v2 = wifi_under_5g ? BTC_ASSOCIATE_5G_FINISH :
-                                              BTC_ASSOCIATE_FINISH;
-       }
 
        halbtc_leave_low_power(btcoexist);
 
index 0e509c33e9e6859ca26ee663958de2590734b83f..b8c4536af6c006b2b1ca47fc2067579fdc06dd91 100644 (file)
@@ -316,7 +316,7 @@ void rtl_btc_btinfo_notify(struct rtl_priv *rtlpriv, u8 *tmp_buf, u8 length)
 void rtl_btc_btmpinfo_notify(struct rtl_priv *rtlpriv, u8 *tmp_buf, u8 length)
 {
        struct btc_coexist *btcoexist = rtl_btc_coexist(rtlpriv);
-       u8 extid, seq, len;
+       u8 extid, seq;
        u16 bt_real_fw_ver;
        u8 bt_fw_ver;
        u8 *data;
@@ -332,7 +332,6 @@ void rtl_btc_btmpinfo_notify(struct rtl_priv *rtlpriv, u8 *tmp_buf, u8 length)
        if (extid != 1) /* C2H_TRIG_BY_BT_FW = 1 */
                return;
 
-       len = tmp_buf[1] >> 4;
        seq = tmp_buf[2] >> 4;
        data = &tmp_buf[3];