All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtlwifi: btcoex: 23b 1ant: fix duplicated code for different branches
@ 2017-08-30 13:42 Gustavo A. R. Silva
  2017-08-30 16:37 ` Larry Finger
  2017-08-31  4:48 ` Larry Finger
  0 siblings, 2 replies; 6+ messages in thread
From: Gustavo A. R. Silva @ 2017-08-30 13:42 UTC (permalink / raw)
  To: Larry Finger, Chaoming Li, Kalle Valo
  Cc: linux-wireless, netdev, linux-kernel, 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: 1226788
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
This issue was reported by Coverity and it was tested by compilation only.
I'm suspicious this may be a copy/paste error. Please, verify.

 .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c   | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
index c044252..960ce80f 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
@@ -2260,14 +2260,8 @@ static void halbtc8723b1ant_run_coexist_mechanism(struct btc_coexist *btcoexist)
 
 		if (iot_peer != BTC_IOT_PEER_CISCO &&
 		    iot_peer != BTC_IOT_PEER_BROADCOM) {
-			if (bt_link_info->sco_exist)
-				halbtc8723b1ant_limited_rx(btcoexist,
-							   NORMAL_EXEC, false,
-							   false, 0x5);
-			else
-				halbtc8723b1ant_limited_rx(btcoexist,
-							   NORMAL_EXEC, false,
-							   false, 0x5);
+			halbtc8723b1ant_limited_rx(btcoexist, NORMAL_EXEC,
+						   false, false, 0x5);
 		} else {
 			if (bt_link_info->sco_exist) {
 				halbtc8723b1ant_limited_rx(btcoexist,
-- 
2.5.0

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

* Re: [PATCH] rtlwifi: btcoex: 23b 1ant: fix duplicated code for different branches
  2017-08-30 13:42 [PATCH] rtlwifi: btcoex: 23b 1ant: fix duplicated code for different branches Gustavo A. R. Silva
@ 2017-08-30 16:37 ` Larry Finger
  2017-08-30 16:51   ` Gustavo A. R. Silva
  2017-08-31  4:48 ` Larry Finger
  1 sibling, 1 reply; 6+ messages in thread
From: Larry Finger @ 2017-08-30 16:37 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Pkshih, Kalle Valo
  Cc: linux-wireless, netdev, linux-kernel

On 08/30/2017 08:42 AM, Gustavo A. R. Silva wrote:
> Refactor code in order to avoid identical code for different branches.
> 
> This issue was detected with the help of Coccinelle.
> 
> Addresses-Coverity-ID: 1226788
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> This issue was reported by Coverity and it was tested by compilation only.
> I'm suspicious this may be a copy/paste error. Please, verify.

I have referred this change to the engineers at Realtek. For the moment, please 
hold this patch.

Thanks for reporting the condition.

Larry

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

* Re: [PATCH] rtlwifi: btcoex: 23b 1ant: fix duplicated code for different branches
  2017-08-30 16:37 ` Larry Finger
@ 2017-08-30 16:51   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 6+ messages in thread
From: Gustavo A. R. Silva @ 2017-08-30 16:51 UTC (permalink / raw)
  To: Larry Finger, Pkshih, Kalle Valo; +Cc: linux-wireless, netdev, linux-kernel

Hi Larry,

On 08/30/2017 11:37 AM, Larry Finger wrote:
> On 08/30/2017 08:42 AM, Gustavo A. R. Silva wrote:
>> Refactor code in order to avoid identical code for different branches.
>>
>> This issue was detected with the help of Coccinelle.
>>
>> Addresses-Coverity-ID: 1226788
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> ---
>> This issue was reported by Coverity and it was tested by compilation
>> only.
>> I'm suspicious this may be a copy/paste error. Please, verify.
>
> I have referred this change to the engineers at Realtek. For the moment,
> please hold this patch.
>
> Thanks for reporting the condition.
>

Glad to help. :)

-- 
Gustavo A. R. Silva

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

* Re: [PATCH] rtlwifi: btcoex: 23b 1ant: fix duplicated code for different branches
  2017-08-30 13:42 [PATCH] rtlwifi: btcoex: 23b 1ant: fix duplicated code for different branches Gustavo A. R. Silva
  2017-08-30 16:37 ` Larry Finger
@ 2017-08-31  4:48 ` Larry Finger
  2017-09-07 14:35   ` Gustavo A. R. Silva
  1 sibling, 1 reply; 6+ messages in thread
From: Larry Finger @ 2017-08-31  4:48 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Chaoming Li, Kalle Valo
  Cc: linux-wireless, netdev, linux-kernel

On 08/30/2017 08:42 AM, Gustavo A. R. Silva wrote:
> Refactor code in order to avoid identical code for different branches.
> 
> This issue was detected with the help of Coccinelle.
> 
> Addresses-Coverity-ID: 1226788
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> This issue was reported by Coverity and it was tested by compilation only.
> I'm suspicious this may be a copy/paste error. Please, verify.
> 
>   .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c   | 10 ++--------
>   1 file changed, 2 insertions(+), 8 deletions(-)

This change is not correct. When bt_link_info->sco_exist is true, the call should be

				halbtc8723b1ant_limited_rx(btcoexist,
							   NORMAL_EXEC, true,
							   false, 0x5);

NACK

I will push the correct patch.

Larry

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

* Re: [PATCH] rtlwifi: btcoex: 23b 1ant: fix duplicated code for different branches
  2017-08-31  4:48 ` Larry Finger
@ 2017-09-07 14:35   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 6+ messages in thread
From: Gustavo A. R. Silva @ 2017-09-07 14:35 UTC (permalink / raw)
  To: Larry Finger, Chaoming Li, Kalle Valo
  Cc: linux-wireless, netdev, linux-kernel

Hi Larry,

On 08/30/2017 11:48 PM, Larry Finger wrote:
> On 08/30/2017 08:42 AM, Gustavo A. R. Silva wrote:
>> Refactor code in order to avoid identical code for different branches.
>>
>> This issue was detected with the help of Coccinelle.
>>
>> Addresses-Coverity-ID: 1226788
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> ---
>> This issue was reported by Coverity and it was tested by compilation
>> only.
>> I'm suspicious this may be a copy/paste error. Please, verify.
>>
>>   .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c   | 10
>> ++--------
>>   1 file changed, 2 insertions(+), 8 deletions(-)
>
> This change is not correct. When bt_link_info->sco_exist is true, the
> call should be
>
>                 halbtc8723b1ant_limited_rx(btcoexist,
>                                NORMAL_EXEC, true,
>                                false, 0x5);
>
> NACK
>
> I will push the correct patch.
>

Great. Good to know.

Thanks
-- 
Gustavo A. R. Silva

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

* [PATCH] rtlwifi: btcoex: 23b 1ant: fix duplicated code for different branches
@ 2017-08-18  0:22 Gustavo A. R. Silva
  0 siblings, 0 replies; 6+ messages in thread
From: Gustavo A. R. Silva @ 2017-08-18  0:22 UTC (permalink / raw)
  To: Larry Finger, Chaoming Li, Kalle Valo
  Cc: linux-wireless, netdev, linux-kernel, 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
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
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(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
index 03998d2..c044252 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
@@ -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,
-- 
2.5.0

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

end of thread, other threads:[~2017-09-07 14:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-30 13:42 [PATCH] rtlwifi: btcoex: 23b 1ant: fix duplicated code for different branches Gustavo A. R. Silva
2017-08-30 16:37 ` Larry Finger
2017-08-30 16:51   ` Gustavo A. R. Silva
2017-08-31  4:48 ` Larry Finger
2017-09-07 14:35   ` Gustavo A. R. Silva
  -- strict thread matches above, loose matches on Subject: below --
2017-08-18  0:22 Gustavo A. R. Silva

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.