All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtlwifi: btcoex: remove identical statements within if-else branches
@ 2018-04-09  7:51 pkshih
  2018-04-24 17:27 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: pkshih @ 2018-04-09  7:51 UTC (permalink / raw)
  To: kvalo; +Cc: gustavo, linux-wireless

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

Since the statements are identical, we can safely remove the statements.
The commit 42e74946f016 ("rtlwifi: btcoexist: Fix if == else warnings in
halbtc8821a1ant.c") had fixed the statements, but the commit c6821613e653
("rtlwifi: btcoex: follow linux coding style") that converted coding style
and upgraded btcoex didn't include the fix.

Reported-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 .../realtek/rtlwifi/btcoexist/halbtc8821a1ant.c       | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
index d3eb717078bf..f29bf4f3a905 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
@@ -1578,11 +1578,7 @@ static void btc8821a1ant_act_bt_sco_hid_only_busy(struct btc_coexist *btcoexist,
 	/* tdma and coex table */
 	btc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5);
 
-	if (BT_8821A_1ANT_WIFI_STATUS_NON_CONNECTED_ASSO_AUTH_SCAN ==
-	    wifi_status)
-		btc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1);
-	else
-		btc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1);
+	btc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1);
 }
 
 static void btc8821a1ant_act_wifi_con_bt_acl_busy(struct btc_coexist *btcoexist,
@@ -1992,16 +1988,9 @@ static void btc8821a1ant_run_coexist_mechanism(struct btc_coexist *btcoexist)
 			wifi_rssi_state =
 				btc8821a1ant_wifi_rssi_state(btcoexist, 1, 2,
 							     30, 0);
-			if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
-			    (wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
-				btc8821a1ant_limited_tx(btcoexist,
-							NORMAL_EXEC, 1, 1,
-							0, 1);
-			} else {
-				btc8821a1ant_limited_tx(btcoexist,
-							NORMAL_EXEC, 1, 1,
-							0, 1);
-			}
+			btc8821a1ant_limited_tx(btcoexist,
+						NORMAL_EXEC, 1, 1,
+						0, 1);
 		} else {
 			btc8821a1ant_limited_tx(btcoexist, NORMAL_EXEC,
 						0, 0, 0, 0);
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: rtlwifi: btcoex: remove identical statements within if-else branches
  2018-04-09  7:51 [PATCH] rtlwifi: btcoex: remove identical statements within if-else branches pkshih
@ 2018-04-24 17:27 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2018-04-24 17:27 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: gustavo, linux-wireless

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

> From: Ping-Ke Shih <pkshih@realtek.com>
> 
> Since the statements are identical, we can safely remove the statements.
> The commit 42e74946f016 ("rtlwifi: btcoexist: Fix if == else warnings in
> halbtc8821a1ant.c") had fixed the statements, but the commit c6821613e653
> ("rtlwifi: btcoex: follow linux coding style") that converted coding style
> and upgraded btcoex didn't include the fix.
> 
> Reported-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>

Patch applied to wireless-drivers-next.git, thanks.

8cf304a85378 rtlwifi: btcoex: remove identical statements within if-else branches

-- 
https://patchwork.kernel.org/patch/10330711/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-24 17:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-09  7:51 [PATCH] rtlwifi: btcoex: remove identical statements within if-else branches pkshih
2018-04-24 17:27 ` Kalle Valo

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.