* [PATCH] rtlwifi: btcoex: 23b 1ant: initialize bt_disabled to false
@ 2017-05-19 21:25 Dan Carpenter
2017-05-20 2:22 ` Larry Finger
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Dan Carpenter @ 2017-05-19 21:25 UTC (permalink / raw)
To: Larry Finger
Cc: Chaoming Li, Kalle Valo, Ping-Ke Shih, Yan-Hsuan Chuang,
linux-wireless, kernel-janitors
We only want to disable this if bt_disable_cnt is >= 2.
Fixes: f66509e3d7c2 ("rtlwifi: btcoex: Remove 23b 1ant configuration parameter")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Btw, that patch also introduced Sparse warning but I don't know how to
address it.
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c:1432:63: warning: odd constant _Bool cast (2 becomes 1)
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
index f3704d7db4d5..d563a76f0262 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
@@ -1438,7 +1438,7 @@ static void halbtc8723b1ant_monitor_bt_enable_disable(struct btc_coexist
{
struct rtl_priv *rtlpriv = btcoexist->adapter;
static u32 bt_disable_cnt;
- bool bt_active = true, bt_disabled;
+ bool bt_active = true, bt_disabled = false;
if (coex_sta->high_priority_tx == 0 &&
coex_sta->high_priority_rx == 0 && coex_sta->low_priority_tx == 0 &&
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] rtlwifi: btcoex: 23b 1ant: initialize bt_disabled to false
2017-05-19 21:25 [PATCH] rtlwifi: btcoex: 23b 1ant: initialize bt_disabled to false Dan Carpenter
@ 2017-05-20 2:22 ` Larry Finger
2017-05-20 5:29 ` Dan Carpenter
2017-05-20 15:02 ` Larry Finger
2017-05-24 13:52 ` Kalle Valo
2 siblings, 1 reply; 5+ messages in thread
From: Larry Finger @ 2017-05-20 2:22 UTC (permalink / raw)
To: Dan Carpenter
Cc: Chaoming Li, Kalle Valo, Ping-Ke Shih, Yan-Hsuan Chuang,
linux-wireless, kernel-janitors
On 05/19/2017 04:25 PM, Dan Carpenter wrote:
> We only want to disable this if bt_disable_cnt is >= 2.
>
> Fixes: f66509e3d7c2 ("rtlwifi: btcoex: Remove 23b 1ant configuration parameter")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Btw, that patch also introduced Sparse warning but I don't know how to
> address it.
>
> drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c:1432:63: warning: odd constant _Bool cast (2 becomes 1)
I agree that bt_disabled needs to be initialized. Actually, I would have
expected an unitialized variable warning out of gcc.
Earlier today, I finished applying the rest of the btcoex patches from Realtek
and now have a clean Sparse run. I never saw that message, and I certainly do
not understand it either.
Larry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] rtlwifi: btcoex: 23b 1ant: initialize bt_disabled to false
2017-05-20 2:22 ` Larry Finger
@ 2017-05-20 5:29 ` Dan Carpenter
0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2017-05-20 5:29 UTC (permalink / raw)
To: Larry Finger
Cc: Chaoming Li, Kalle Valo, Ping-Ke Shih, Yan-Hsuan Chuang,
linux-wireless, kernel-janitors
On Fri, May 19, 2017 at 09:22:59PM -0500, Larry Finger wrote:
> On 05/19/2017 04:25 PM, Dan Carpenter wrote:
> > We only want to disable this if bt_disable_cnt is >= 2.
> >
> > Fixes: f66509e3d7c2 ("rtlwifi: btcoex: Remove 23b 1ant configuration parameter")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> > Btw, that patch also introduced Sparse warning but I don't know how to
> > address it.
> >
> > drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c:1432:63: warning: odd constant _Bool cast (2 becomes 1)
>
> I agree that bt_disabled needs to be initialized. Actually, I would have
> expected an unitialized variable warning out of gcc.
>
> Earlier today, I finished applying the rest of the btcoex patches from
> Realtek and now have a clean Sparse run. I never saw that message, and I
> certainly do not understand it either.
>
> Larry
I had another look and I figured it out. I'll send a patch.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] rtlwifi: btcoex: 23b 1ant: initialize bt_disabled to false
2017-05-19 21:25 [PATCH] rtlwifi: btcoex: 23b 1ant: initialize bt_disabled to false Dan Carpenter
2017-05-20 2:22 ` Larry Finger
@ 2017-05-20 15:02 ` Larry Finger
2017-05-24 13:52 ` Kalle Valo
2 siblings, 0 replies; 5+ messages in thread
From: Larry Finger @ 2017-05-20 15:02 UTC (permalink / raw)
To: Dan Carpenter
Cc: Chaoming Li, Kalle Valo, Ping-Ke Shih, Yan-Hsuan Chuang,
linux-wireless, kernel-janitors
On 05/19/2017 04:25 PM, Dan Carpenter wrote:
> We only want to disable this if bt_disable_cnt is >= 2.
>
> Fixes: f66509e3d7c2 ("rtlwifi: btcoex: Remove 23b 1ant configuration parameter")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Thanks,
Larry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rtlwifi: btcoex: 23b 1ant: initialize bt_disabled to false
2017-05-19 21:25 [PATCH] rtlwifi: btcoex: 23b 1ant: initialize bt_disabled to false Dan Carpenter
2017-05-20 2:22 ` Larry Finger
2017-05-20 15:02 ` Larry Finger
@ 2017-05-24 13:52 ` Kalle Valo
2 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2017-05-24 13:52 UTC (permalink / raw)
To: Dan Carpenter
Cc: Larry Finger, Chaoming Li, Ping-Ke Shih, Yan-Hsuan Chuang,
linux-wireless, kernel-janitors
Dan Carpenter <dan.carpenter@oracle.com> wrote:
> We only want to disable this if bt_disable_cnt is >= 2.
>
> Fixes: f66509e3d7c2 ("rtlwifi: btcoex: Remove 23b 1ant configuration parameter")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Patch applied to wireless-drivers-next.git, thanks.
e578618934cb rtlwifi: btcoex: 23b 1ant: initialize bt_disabled to false
--
https://patchwork.kernel.org/patch/9738199/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-05-24 13:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-19 21:25 [PATCH] rtlwifi: btcoex: 23b 1ant: initialize bt_disabled to false Dan Carpenter
2017-05-20 2:22 ` Larry Finger
2017-05-20 5:29 ` Dan Carpenter
2017-05-20 15:02 ` Larry Finger
2017-05-24 13:52 ` 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).