* [PATCH 1/1] rtlwifi: btcoex: 21a 2ant: Delete several duplicate condition branch codes
@ 2021-05-10 8:22 Zhen Lei
2021-06-15 13:38 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Zhen Lei @ 2021-05-10 8:22 UTC (permalink / raw)
To: Ping-Ke Shih, Kalle Valo, David S . Miller, Jakub Kicinski,
linux-wireless, netdev
Cc: Zhen Lei
The statements of the "if (max_interval == 3)" branch are the same as
those of the "else" branch. Delete them to simplify the code.
No functional change.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
.../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c
index 447caa4aad325bf..0990b4e84b2538f 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c
@@ -1721,10 +1721,6 @@ static void btc8821a2ant_tdma_duration_adjust(struct btc_coexist *btcoexist,
btc8821a2ant_ps_tdma(btcoexist,
NORMAL_EXEC, true, 14);
coex_dm->ps_tdma_du_adj_type = 14;
- } else if (max_interval == 3) {
- btc8821a2ant_ps_tdma(btcoexist,
- NORMAL_EXEC, true, 15);
- coex_dm->ps_tdma_du_adj_type = 15;
} else {
btc8821a2ant_ps_tdma(btcoexist,
NORMAL_EXEC, true, 15);
@@ -1739,10 +1735,6 @@ static void btc8821a2ant_tdma_duration_adjust(struct btc_coexist *btcoexist,
btc8821a2ant_ps_tdma(btcoexist,
NORMAL_EXEC, true, 10);
coex_dm->ps_tdma_du_adj_type = 10;
- } else if (max_interval == 3) {
- btc8821a2ant_ps_tdma(btcoexist,
- NORMAL_EXEC, true, 11);
- coex_dm->ps_tdma_du_adj_type = 11;
} else {
btc8821a2ant_ps_tdma(btcoexist,
NORMAL_EXEC, true, 11);
@@ -1759,10 +1751,6 @@ static void btc8821a2ant_tdma_duration_adjust(struct btc_coexist *btcoexist,
btc8821a2ant_ps_tdma(btcoexist,
NORMAL_EXEC, true, 6);
coex_dm->ps_tdma_du_adj_type = 6;
- } else if (max_interval == 3) {
- btc8821a2ant_ps_tdma(btcoexist,
- NORMAL_EXEC, true, 7);
- coex_dm->ps_tdma_du_adj_type = 7;
} else {
btc8821a2ant_ps_tdma(btcoexist,
NORMAL_EXEC, true, 7);
@@ -1777,10 +1765,6 @@ static void btc8821a2ant_tdma_duration_adjust(struct btc_coexist *btcoexist,
btc8821a2ant_ps_tdma(btcoexist,
NORMAL_EXEC, true, 2);
coex_dm->ps_tdma_du_adj_type = 2;
- } else if (max_interval == 3) {
- btc8821a2ant_ps_tdma(btcoexist,
- NORMAL_EXEC, true, 3);
- coex_dm->ps_tdma_du_adj_type = 3;
} else {
btc8821a2ant_ps_tdma(btcoexist,
NORMAL_EXEC, true, 3);
--
2.26.0.106.g9fadedd
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] rtlwifi: btcoex: 21a 2ant: Delete several duplicate condition branch codes
2021-05-10 8:22 [PATCH 1/1] rtlwifi: btcoex: 21a 2ant: Delete several duplicate condition branch codes Zhen Lei
@ 2021-06-15 13:38 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-06-15 13:38 UTC (permalink / raw)
To: Zhen Lei
Cc: Ping-Ke Shih, David S . Miller, Jakub Kicinski, linux-wireless,
netdev, Zhen Lei
Zhen Lei <thunder.leizhen@huawei.com> wrote:
> The statements of the "if (max_interval == 3)" branch are the same as
> those of the "else" branch. Delete them to simplify the code.
>
> No functional change.
>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Patch applied to wireless-drivers-next.git, thanks.
d56b69c4fbc7 rtlwifi: btcoex: 21a 2ant: Delete several duplicate condition branch codes
--
https://patchwork.kernel.org/project/linux-wireless/patch/20210510082237.3315-1-thunder.leizhen@huawei.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-15 13:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 8:22 [PATCH 1/1] rtlwifi: btcoex: 21a 2ant: Delete several duplicate condition branch codes Zhen Lei
2021-06-15 13:38 ` 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).