* [PATCH] rtlwifi: btcoexist: 23b 1ant: fix duplicated code for different branches
@ 2017-08-31 14:48 Larry Finger
2017-09-20 12:44 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Larry Finger @ 2017-08-31 14:48 UTC (permalink / raw)
To: kvalo
Cc: linux-wireless, Larry Finger, Ping-Ke Shih, Yan-Hsuan Chuang,
Birming Chiu, Shaofu, Steven Ting
A typo led to this issue, which was detected with the help of Coccinelle.
In addition to fixing the error, the code is refactored to eliminate an
if statement.
Addresses-Coverity-ID: 1226788
Reported-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
---
.../wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
index c04425236ce4..5f726f6d3567 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
@@ -2260,14 +2260,11 @@ 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);
+ bool sco_exist = bt_link_info->sco_exist;
+
+ halbtc8723b1ant_limited_rx(btcoexist,
+ NORMAL_EXEC, sco_exist,
+ false, 0x5);
} else {
if (bt_link_info->sco_exist) {
halbtc8723b1ant_limited_rx(btcoexist,
--
2.12.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: rtlwifi: btcoexist: 23b 1ant: fix duplicated code for different branches
2017-08-31 14:48 [PATCH] rtlwifi: btcoexist: 23b 1ant: fix duplicated code for different branches Larry Finger
@ 2017-09-20 12:44 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2017-09-20 12:44 UTC (permalink / raw)
To: Larry Finger
Cc: linux-wireless, Larry Finger, Ping-Ke Shih, Yan-Hsuan Chuang,
Birming Chiu, Shaofu, Steven Ting
Larry Finger <Larry.Finger@lwfinger.net> wrote:
> A typo led to this issue, which was detected with the help of Coccinelle.
>
> In addition to fixing the error, the code is refactored to eliminate an
> if statement.
>
> Addresses-Coverity-ID: 1226788
>
> Reported-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Ping-Ke Shih <pkshih@realtek.com>
> Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
> Cc: Birming Chiu <birming@realtek.com>
> Cc: Shaofu <shaofu@realtek.com>
> Cc: Steven Ting <steventing@realtek.com>
Patch applied to wireless-drivers-next.git, thanks.
0f61953dd0f5 rtlwifi: btcoexist: 23b 1ant: fix duplicated code for different branches
--
https://patchwork.kernel.org/patch/9932349/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-20 12:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-31 14:48 [PATCH] rtlwifi: btcoexist: 23b 1ant: fix duplicated code for different branches Larry Finger
2017-09-20 12:44 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).