2021-01-27 09:58:38

by Abaci Team

[permalink] [raw]
Subject: [PATCH] rtlwifi: halbtc8723b2ant: Remove redundant code

Fix the following coccicheck warnings:

./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:
1876:11-13: WARNING: possible condition with no effect (if == else).

Reported-by: Abaci Robot <[email protected]>
Suggested-by: Jiapeng Zhong <[email protected]>
Signed-off-by: Abaci Team <[email protected]>
---
.../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 22 ----------------------
1 file changed, 22 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
index 7a71f06..ef2c3eb 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
@@ -1273,8 +1273,6 @@ static void btc8723b2ant_ps_tdma(struct btc_coexist *btcoexist, bool force_exec,
} else {
if (coex_sta->a2dp_bit_pool >= 45)
wifi_duration_adjust = -15;
- else if (coex_sta->a2dp_bit_pool >= 35)
- wifi_duration_adjust = -10;
else
wifi_duration_adjust = -10;
}
@@ -1805,11 +1803,6 @@ static void btc8723b2ant_tdma_duration_adjust(struct btc_coexist *btcoexist,
NORMAL_EXEC,
true, 14);
coex_dm->ps_tdma_du_adj_type = 14;
- } else if (max_interval == 3) {
- btc8723b2ant_ps_tdma(btcoexist,
- NORMAL_EXEC,
- true, 15);
- coex_dm->ps_tdma_du_adj_type = 15;
} else {
btc8723b2ant_ps_tdma(btcoexist,
NORMAL_EXEC,
@@ -1827,11 +1820,6 @@ static void btc8723b2ant_tdma_duration_adjust(struct btc_coexist *btcoexist,
NORMAL_EXEC,
true, 10);
coex_dm->ps_tdma_du_adj_type = 10;
- } else if (max_interval == 3) {
- btc8723b2ant_ps_tdma(btcoexist,
- NORMAL_EXEC,
- true, 11);
- coex_dm->ps_tdma_du_adj_type = 11;
} else {
btc8723b2ant_ps_tdma(btcoexist,
NORMAL_EXEC,
@@ -1851,11 +1839,6 @@ static void btc8723b2ant_tdma_duration_adjust(struct btc_coexist *btcoexist,
NORMAL_EXEC,
true, 6);
coex_dm->ps_tdma_du_adj_type = 6;
- } else if (max_interval == 3) {
- btc8723b2ant_ps_tdma(btcoexist,
- NORMAL_EXEC,
- true, 7);
- coex_dm->ps_tdma_du_adj_type = 7;
} else {
btc8723b2ant_ps_tdma(btcoexist,
NORMAL_EXEC,
@@ -1873,11 +1856,6 @@ static void btc8723b2ant_tdma_duration_adjust(struct btc_coexist *btcoexist,
NORMAL_EXEC,
true, 2);
coex_dm->ps_tdma_du_adj_type = 2;
- } else if (max_interval == 3) {
- btc8723b2ant_ps_tdma(btcoexist,
- NORMAL_EXEC,
- true, 3);
- coex_dm->ps_tdma_du_adj_type = 3;
} else {
btc8723b2ant_ps_tdma(btcoexist,
NORMAL_EXEC,
--
1.8.3.1


2021-01-27 14:33:31

by Willem de Bruijn

[permalink] [raw]
Subject: Re: [PATCH] rtlwifi: halbtc8723b2ant: Remove redundant code

On Wed, Jan 27, 2021 at 6:05 AM Abaci Team
<[email protected]> wrote:
>
> Fix the following coccicheck warnings:
>
> ./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:
> 1876:11-13: WARNING: possible condition with no effect (if == else).
>
> Reported-by: Abaci Robot <[email protected]>
> Suggested-by: Jiapeng Zhong <[email protected]>
> Signed-off-by: Abaci Team <[email protected]>

Signed-off-by lines need to have a real name. See
Documentation/process/submitting-patches.rst

With that change

Acked-by: Willem de Bruijn <[email protected]>