Re: [PATCH v1] staging: rtl8723bs: remove empty if branch in halbtc8723b1ant_RunSwCoexistMechanism

From: Ahmet Sezgin Duran

Date: Sun Oct 18 2026 - 10:55:41 EST


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@xxxxxxxxx>
---
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@xxxxxxxxxxx/

Regards,
Ahmet Sezgin Duran