rtlwifi: Add modifier static to functions reported by sparse
authorPing-Ke Shih <pkshih@realtek.com>
Tue, 6 Mar 2018 01:25:40 +0000 (09:25 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 27 Mar 2018 08:54:38 +0000 (11:54 +0300)
sparse reports some functions were not declared, so add 'static' as
modifier. Remove an unused function btc8821a1ant_is_wifi_status_changed()
exposed due to 'static'.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c

index 05beb16f0a0ab5f018ed5038021648b5412575db..59553db020ef5a1ca905b96e2a50f803426143c2 100644 (file)
@@ -1436,6 +1436,7 @@ static void halbtc8723b1ant_ps_tdma(struct btc_coexist *btcoexist,
        coex_dm->pre_ps_tdma = coex_dm->cur_ps_tdma;
 }
 
+static
 void btc8723b1ant_tdma_dur_adj_for_acl(struct btc_coexist *btcoexist,
                                       u8 wifi_status)
 {
index 4907c2ffadfea77c28634f6a827d2d8b16dbeb4f..73ec31972944ed08ac8ac369be0dae00d1ecceed 100644 (file)
@@ -833,9 +833,9 @@ static void btc8723b2ant_set_sw_fulltime_dac_swing(struct btc_coexist *btcoex,
                btc8723b2ant_set_dac_swing_reg(btcoex, 0x18);
 }
 
-void btc8723b2ant_dac_swing(struct btc_coexist *btcoexist,
-                           bool force_exec, bool dac_swing_on,
-                           u32 dac_swing_lvl)
+static void btc8723b2ant_dac_swing(struct btc_coexist *btcoexist,
+                                  bool force_exec, bool dac_swing_on,
+                                  u32 dac_swing_lvl)
 {
        struct rtl_priv *rtlpriv = btcoexist->adapter;
 
index 0b26419881c0dea74c30b6815b5130aad5a89c08..202597cf89156dc9356c2ec20f17da253c2b2764 100644 (file)
@@ -426,39 +426,6 @@ static void btc8821a1ant_query_bt_info(struct btc_coexist *btcoexist)
        btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter);
 }
 
-bool btc8821a1ant_is_wifi_status_changed(struct btc_coexist *btcoexist)
-{
-       static bool pre_wifi_busy = true;
-       static bool pre_under_4way = true;
-       static bool pre_bt_hs_on = true;
-       bool wifi_busy = false, under_4way = false, bt_hs_on = false;
-       bool wifi_connected = false;
-
-       btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED,
-                          &wifi_connected);
-       btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy);
-       btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on);
-       btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS,
-                          &under_4way);
-
-       if (wifi_connected) {
-               if (wifi_busy != pre_wifi_busy) {
-                       pre_wifi_busy = wifi_busy;
-                       return true;
-               }
-               if (under_4way != pre_under_4way) {
-                       pre_under_4way = under_4way;
-                       return true;
-               }
-               if (bt_hs_on != pre_bt_hs_on) {
-                       pre_bt_hs_on = bt_hs_on;
-                       return true;
-               }
-       }
-
-       return false;
-}
-
 static void btc8821a1ant_update_bt_link_info(struct btc_coexist *btcoexist)
 {
        struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info;
index d5f282cb9d240ba031d8458a8e80000b6442cbfc..2202d5e18977c028dfbbdcbb6df7e79926f784cb 100644 (file)
@@ -359,7 +359,7 @@ static void btc8821a2ant_query_bt_info(struct btc_coexist *btcoexist)
        btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter);
 }
 
-bool btc8821a2ant_is_wifi_status_changed(struct btc_coexist *btcoexist)
+static bool btc8821a2ant_is_wifi_status_changed(struct btc_coexist *btcoexist)
 {
        static bool pre_wifi_busy = true;
        static bool pre_under_4way = true;
@@ -1517,7 +1517,7 @@ static void btc8821a2ant_action_bt_inquiry(struct btc_coexist *btcoexist)
        btc8821a2ant_sw_mechanism2(btcoexist, false, false, false, 0x18);
 }
 
-void btc8821a2ant_action_wifi_link_process(struct btc_coexist *btcoexist)
+static void btc8821a2ant_action_wifi_link_process(struct btc_coexist *btcoexist)
 {
        struct rtl_priv *rtlpriv = btcoexist->adapter;
        u8 u8tmpa, u8tmpb;