Skip to contentSkip to conversation

rtlwifi: btcoex: 23b 1ant: fix duplicated code for different branches

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Aug 18, 2017 – Aug 24, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtlwifi: btcoex: 23b 1ant: fix duplicated code for different branches

Refactor code in order to avoid identical code for different branches.

This issue was detected with the help of Coccinelle.

Addresses-Coverity-ID: 1415177

---
This issue was reported by Coverity and it was tested by compilation only.

 .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c   | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c +2 -8
index 03998d2..c044252 100644
@@ -600,14 +600,8 @@ static void halbtc8723b1ant_coex_table_with_type(struct btc_coexist *btcoexist,
 						   0xffffff, 0x3);
 		break;
 	case 5:
-		if ((coex_sta->cck_ever_lock) && (coex_sta->scan_ap_num <= 5))
-			halbtc8723b1ant_coex_table(btcoexist, force_exec,
-						   0x5a5a5a5a, 0x5aaa5a5a,
-						   0xffffff, 0x3);
-		else
-			halbtc8723b1ant_coex_table(btcoexist, force_exec,
-						   0x5a5a5a5a, 0x5aaa5a5a,
-						   0xffffff, 0x3);
+		halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x5a5a5a5a,
+					   0x5aaa5a5a, 0xffffff, 0x3);
 		break;
 	case 6:
 		halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55555555,
Signature · 1 line
2.5.0
#1 lore raw
Quoted 6 lines · Gustavo A. R. Silva

Refactor code in order to avoid identical code for different branches.

This issue was detected with the help of Coccinelle.

Addresses-Coverity-ID: 1415177

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

14cc696c0a4a rtlwifi: btcoex: 23b 1ant: fix duplicated code for different branches

Signature · 3 lines
https://patchwork.kernel.org/patch/9907397/

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