All of lore.kernel.org
 help / color / mirror / Atom feed
From: <pkshih@realtek.com>
To: <kvalo@codeaurora.org>
Cc: <Larry.Finger@lwfinger.net>, <linux-wireless@vger.kernel.org>
Subject: [PATCH 01/15] rtlwifi: Add modifier static to functions reported by sparse
Date: Wed, 28 Feb 2018 11:07:04 +0800	[thread overview]
Message-ID: <20180228030718.19510-2-pkshih@realtek.com> (raw)
In-Reply-To: <20180228030718.19510-1-pkshih@realtek.com>

From: Ping-Ke Shih <pkshih@realtek.com>

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>
---
 .../realtek/rtlwifi/btcoexist/halbtc8723b1ant.c    |  1 +
 .../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c    |  6 ++--
 .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c    | 33 ----------------------
 .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c    |  4 +--
 4 files changed, 6 insertions(+), 38 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
index 05beb16f0a0a..59553db020ef 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
@@ -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)
 {
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
index 4907c2ffadfe..73ec31972944 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
@@ -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;
 
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
index 0b26419881c0..202597cf8915 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
@@ -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;
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c
index d5f282cb9d24..2202d5e18977 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c
@@ -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;
-- 
2.15.1

  reply	other threads:[~2018-02-28  3:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28  3:07 [PATCH 00/15] rtlwifi: Add 8822b 1ant/2ant btcoex files pkshih
2018-02-28  3:07 ` pkshih [this message]
2018-03-02 22:06   ` [PATCH 01/15] rtlwifi: Add modifier static to functions reported by sparse Larry Finger
2018-02-28  3:07 ` [PATCH 02/15] rtlwifi: remove redundant statement found by static checker pkshih
2018-03-02 22:07   ` Larry Finger
2018-02-28  3:07 ` [PATCH 03/15] rtlwifi: btcoex: Add enum DM_INFO for btcoex to query dm's counters pkshih
2018-03-02 22:19   ` Larry Finger
2018-03-03  5:12     ` Pkshih
2018-02-28  3:07 ` [PATCH 04/15] rtlwifi: btcoex: Add customer_id to do special deal to oem vendor pkshih
2018-03-02 22:12   ` Larry Finger
2018-02-28  3:07 ` [PATCH 05/15] rtlwifi: btcoex: Get status of multichannel concurrence pkshih
2018-03-02 22:20   ` Larry Finger
2018-02-28  3:07 ` [PATCH 06/15] rtlwifi: btcoex: Add rate table for the use of btcoex pkshih
2018-02-28  3:07 ` [PATCH 07/15] rtlwifi: btcoex: Add interaction with phydm pkshih
2018-02-28  3:07 ` [PATCH 08/15] rtlwifi: btcoex: Add pre- and post- normal LPS function pkshih
2018-02-28  3:07 ` [PATCH 09/15] rtlwifi: btcoex: add assoc type v2 to connection notify pkshih
2018-02-28  3:07 ` [PATCH 10/15] rtlwifi: btcoex: new definitions introduced by 8822be pkshih
2018-02-28  3:07 ` [PATCH 11/15] rtlwifi: btcoex: Add new but dummy definitions introduced by 8822b pkshih
2018-02-28  3:07 ` [PATCH 12/15] rtlwifi: btcoex: Add 8822b 1ant/2ant coex files pkshih
2018-03-27  7:32   ` Kalle Valo
2018-03-27  9:32     ` Pkshih
2018-03-27 14:17       ` Kalle Valo
2018-02-28  3:07 ` [PATCH 13/15] rtlwifi: btcoex: Add 8822b header files to precomp.h pkshih
2018-02-28  3:07 ` [PATCH 14/15] rtlwifi: btcoex: Add 8822b to Makefile pkshih
2018-02-28  3:07 ` [PATCH 15/15] rtlwifi: btcoex: Add 8822b routine to btc interfaces pkshih

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180228030718.19510-2-pkshih@realtek.com \
    --to=pkshih@realtek.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.