* [PATCH] rtlwifi: btcoexist: fix conditions branches that are never executed
@ 2022-12-06 10:49 Peter Kosyh
2022-12-07 1:06 ` Ping-Ke Shih
2022-12-08 14:53 ` wifi: " Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Peter Kosyh @ 2022-12-06 10:49 UTC (permalink / raw)
To: Ping-Ke Shih
Cc: Peter Kosyh, Kalle Valo, David S. Miller, Eric Dumazet,
Jakub Kicinski, linux-wireless, netdev, linux-kernel, lvc-project
Commit 40ca18823515 ("rtlwifi: btcoex: 23b 1ant: fine tune for wifi not
connected") introduced never executed branches.
Compile test only.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Peter Kosyh <pkosyh@yandex.ru>
---
I'm not sure that patch do right thing! But these two places are really
never executed and should be fixed. I hope that Ping-Ka could check this.
.../net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
index 70492929d7e4..039bbedb41c2 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
@@ -1903,7 +1903,7 @@ btc8723b1ant_action_wifi_not_conn_scan(struct btc_coexist *btcoexist)
true, 32);
halbtc8723b1ant_coex_table_with_type(btcoexist,
NORMAL_EXEC, 4);
- } else if (bt_link_info->a2dp_exist) {
+ } else if (bt_link_info->pan_exist) {
halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC,
true, 22);
halbtc8723b1ant_coex_table_with_type(btcoexist,
@@ -1964,8 +1964,7 @@ static void btc8723b1ant_action_wifi_conn_scan(struct btc_coexist *btcoexist)
true, 32);
halbtc8723b1ant_coex_table_with_type(btcoexist,
NORMAL_EXEC, 4);
- } else if (bt_link_info->a2dp_exist &&
- bt_link_info->pan_exist) {
+ } else if (bt_link_info->pan_exist) {
halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC,
true, 22);
halbtc8723b1ant_coex_table_with_type(btcoexist,
--
2.38.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] rtlwifi: btcoexist: fix conditions branches that are never executed
2022-12-06 10:49 [PATCH] rtlwifi: btcoexist: fix conditions branches that are never executed Peter Kosyh
@ 2022-12-07 1:06 ` Ping-Ke Shih
2022-12-08 14:53 ` wifi: " Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Ping-Ke Shih @ 2022-12-07 1:06 UTC (permalink / raw)
To: Peter Kosyh
Cc: Kalle Valo, David S. Miller, Eric Dumazet, Jakub Kicinski,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org
> -----Original Message-----
> From: Peter Kosyh <pkosyh@yandex.ru>
> Sent: Tuesday, December 6, 2022 6:49 PM
> To: Ping-Ke Shih <pkshih@realtek.com>
> Cc: Peter Kosyh <pkosyh@yandex.ru>; Kalle Valo <kvalo@kernel.org>; David S. Miller <davem@davemloft.net>;
> Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; linux-wireless@vger.kernel.org;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; lvc-project@linuxtesting.org
> Subject: [PATCH] rtlwifi: btcoexist: fix conditions branches that are never executed
>
> Commit 40ca18823515 ("rtlwifi: btcoex: 23b 1ant: fine tune for wifi not
> connected") introduced never executed branches.
>
> Compile test only.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Peter Kosyh <pkosyh@yandex.ru>
I compare with vendor driver and confirm these changes are correct.
Thank you.
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
> ---
> I'm not sure that patch do right thing! But these two places are really
> never executed and should be fixed. I hope that Ping-Ka could check this.
>
> .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
> b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
> index 70492929d7e4..039bbedb41c2 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c
> @@ -1903,7 +1903,7 @@ btc8723b1ant_action_wifi_not_conn_scan(struct btc_coexist *btcoexist)
> true, 32);
> halbtc8723b1ant_coex_table_with_type(btcoexist,
> NORMAL_EXEC, 4);
> - } else if (bt_link_info->a2dp_exist) {
> + } else if (bt_link_info->pan_exist) {
> halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC,
> true, 22);
> halbtc8723b1ant_coex_table_with_type(btcoexist,
> @@ -1964,8 +1964,7 @@ static void btc8723b1ant_action_wifi_conn_scan(struct btc_coexist *btcoexist)
> true, 32);
> halbtc8723b1ant_coex_table_with_type(btcoexist,
> NORMAL_EXEC, 4);
> - } else if (bt_link_info->a2dp_exist &&
> - bt_link_info->pan_exist) {
> + } else if (bt_link_info->pan_exist) {
> halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC,
> true, 22);
> halbtc8723b1ant_coex_table_with_type(btcoexist,
> --
> 2.38.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: wifi: rtlwifi: btcoexist: fix conditions branches that are never executed
2022-12-06 10:49 [PATCH] rtlwifi: btcoexist: fix conditions branches that are never executed Peter Kosyh
2022-12-07 1:06 ` Ping-Ke Shih
@ 2022-12-08 14:53 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2022-12-08 14:53 UTC (permalink / raw)
To: Peter Kosyh
Cc: Ping-Ke Shih, Peter Kosyh, David S. Miller, Eric Dumazet,
Jakub Kicinski, linux-wireless, netdev, linux-kernel, lvc-project
Peter Kosyh <pkosyh@yandex.ru> wrote:
> Commit 40ca18823515 ("rtlwifi: btcoex: 23b 1ant: fine tune for wifi not
> connected") introduced never executed branches.
>
> Compile test only.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Peter Kosyh <pkosyh@yandex.ru>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Patch applied to wireless-next.git, thanks.
e48c45318d3d wifi: rtlwifi: btcoexist: fix conditions branches that are never executed
--
https://patchwork.kernel.org/project/linux-wireless/patch/20221206104919.739746-1-pkosyh@yandex.ru/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-08 14:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-06 10:49 [PATCH] rtlwifi: btcoexist: fix conditions branches that are never executed Peter Kosyh
2022-12-07 1:06 ` Ping-Ke Shih
2022-12-08 14:53 ` wifi: " 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).