rtlwifi: btcoex: Remove set but not used variable 'result'
authorzhengbin <zhengbin13@huawei.com>
Fri, 4 Oct 2019 08:43:53 +0000 (16:43 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 9 Oct 2019 08:22:43 +0000 (11:22 +0300)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8192e2ant.c: In function btc8192e2ant_tdma_duration_adjust:
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8192e2ant.c:1584:6: warning: variable result set but not used [-Wunused-but-set-variable]

It is not used since commit 27a31a60a4de ("rtlwifi:
btcoex: remove unused functions")

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/btcoexist/halbtc8192e2ant.c

index 3ebc7c9..3c96c32 100644 (file)
@@ -1578,10 +1578,6 @@ static void btc8192e2ant_tdma_duration_adjust(struct btc_coexist *btcoexist,
 {
        struct rtl_priv *rtlpriv = btcoexist->adapter;
        static int up, dn, m, n, wait_cnt;
-       /* 0: no change, +1: increase WiFi duration,
-        * -1: decrease WiFi duration
-        */
-       int result;
        u8 retry_cnt = 0;
 
        RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
@@ -1669,7 +1665,6 @@ static void btc8192e2ant_tdma_duration_adjust(struct btc_coexist *btcoexist,
                dn = 0;
                m = 1;
                n = 3;
-               result = 0;
                wait_cnt = 0;
        } else {
                /* accquire the BT TRx retry count from BT_Info byte2 */
@@ -1679,7 +1674,6 @@ static void btc8192e2ant_tdma_duration_adjust(struct btc_coexist *btcoexist,
                RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
                         "[BTCoex], up=%d, dn=%d, m=%d, n=%d, wait_cnt=%d\n",
                         up, dn, m, n, wait_cnt);
-               result = 0;
                wait_cnt++;
                /* no retry in the last 2-second duration */
                if (retry_cnt == 0) {
@@ -1694,7 +1688,6 @@ static void btc8192e2ant_tdma_duration_adjust(struct btc_coexist *btcoexist,
                                n = 3;
                                up = 0;
                                dn = 0;
-                               result = 1;
                                RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
                                         "[BTCoex]Increase wifi duration!!\n");
                        }
@@ -1718,7 +1711,6 @@ static void btc8192e2ant_tdma_duration_adjust(struct btc_coexist *btcoexist,
                                up = 0;
                                dn = 0;
                                wait_cnt = 0;
-                               result = -1;
                                RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
                                         "Reduce wifi duration for retry<3\n");
                        }
@@ -1735,7 +1727,6 @@ static void btc8192e2ant_tdma_duration_adjust(struct btc_coexist *btcoexist,
                        up = 0;
                        dn = 0;
                        wait_cnt = 0;
-                       result = -1;
                        RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
                                 "Decrease wifi duration for retryCounter>3!!\n");
                }