* [PATCH v1] staging: rtl8723bs: remove empty if branch in halbtc8723b1ant_RunSwCoexistMechanism
@ 2026-10-18 3:31 Nithishvelan M
2026-10-18 14:55 ` Ahmet Sezgin Duran
0 siblings, 1 reply; 2+ messages in thread
From: Nithishvelan M @ 2026-10-18 3:31 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Jennifer Guo, Nithishvelan M
In halbtc8723b1ant_RunSwCoexistMechanism(), the if branch checking
halbtc8723b1ant_IsCommonAction() is empty, leaving the assignment to
preAlgorithm in the else branch. This triggers a checkpatch warning
about unnecessary braces for single-statement blocks.
Invert the condition and eliminate the empty if branch and braces,
simplifying the logic and resolving the checkpatch warning.
Signed-off-by: Nithishvelan M <mnithishvelan@gmail.com>
---
drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c b/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
index 0613beaa37..dfe921033f 100644
--- a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
+++ b/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
@@ -1903,11 +1903,8 @@ static void halbtc8723b1ant_RunSwCoexistMechanism(struct btc_coexist *pBtCoexist
algorithm = halbtc8723b1ant_ActionAlgorithm(pBtCoexist);
pCoexDm->curAlgorithm = algorithm;
- if (halbtc8723b1ant_IsCommonAction(pBtCoexist)) {
-
- } else {
+ if (!halbtc8723b1ant_IsCommonAction(pBtCoexist))
pCoexDm->preAlgorithm = pCoexDm->curAlgorithm;
- }
}
static void halbtc8723b1ant_RunCoexistMechanism(struct btc_coexist *pBtCoexist)
--
2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v1] staging: rtl8723bs: remove empty if branch in halbtc8723b1ant_RunSwCoexistMechanism
2026-10-18 3:31 [PATCH v1] staging: rtl8723bs: remove empty if branch in halbtc8723b1ant_RunSwCoexistMechanism Nithishvelan M
@ 2026-10-18 14:55 ` Ahmet Sezgin Duran
0 siblings, 0 replies; 2+ messages in thread
From: Ahmet Sezgin Duran @ 2026-10-18 14:55 UTC (permalink / raw)
To: Nithishvelan M, gregkh; +Cc: linux-staging, linux-kernel, Jennifer Guo
On 10/18/26 6:31 AM, Nithishvelan M wrote:
> In halbtc8723b1ant_RunSwCoexistMechanism(), the if branch checking
> halbtc8723b1ant_IsCommonAction() is empty, leaving the assignment to
> preAlgorithm in the else branch. This triggers a checkpatch warning
> about unnecessary braces for single-statement blocks.
>
> Invert the condition and eliminate the empty if branch and braces,
> simplifying the logic and resolving the checkpatch warning.
>
> Signed-off-by: Nithishvelan M <mnithishvelan@gmail.com>
> ---
> drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c b/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
> index 0613beaa37..dfe921033f 100644
> --- a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
> +++ b/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
> @@ -1903,11 +1903,8 @@ static void halbtc8723b1ant_RunSwCoexistMechanism(struct btc_coexist *pBtCoexist
> algorithm = halbtc8723b1ant_ActionAlgorithm(pBtCoexist);
> pCoexDm->curAlgorithm = algorithm;
>
> - if (halbtc8723b1ant_IsCommonAction(pBtCoexist)) {
> -
> - } else {
> + if (!halbtc8723b1ant_IsCommonAction(pBtCoexist))
> pCoexDm->preAlgorithm = pCoexDm->curAlgorithm;
> - }
> }
>
> static void halbtc8723b1ant_RunCoexistMechanism(struct btc_coexist *pBtCoexist)
This driver is going to be deleted in the next release, have a look:
https://lore.kernel.org/linux-staging/7e53bd59b7b146caabebeca4347674c7@realtek.com/
Regards,
Ahmet Sezgin Duran
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-18 14:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-18 3:31 [PATCH v1] staging: rtl8723bs: remove empty if branch in halbtc8723b1ant_RunSwCoexistMechanism Nithishvelan M
2026-10-18 14:55 ` Ahmet Sezgin Duran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®