From: Nithishvelan M <mnithishvelan@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Jennifer Guo <guojy.bj@gmail.com>,
Nithishvelan M <mnithishvelan@gmail.com>
Subject: [PATCH v1] staging: rtl8723bs: remove empty if branch in halbtc8723b1ant_RunSwCoexistMechanism
Date: Sun, 18 Oct 2026 03:31:43 +0000 [thread overview]
Message-ID: <20261018033144.865-1-mnithishvelan@gmail.com> (raw)
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
next reply other threads:[~2026-10-18 3:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 3:31 Nithishvelan M [this message]
2026-10-18 14:55 ` Ahmet Sezgin Duran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261018033144.865-1-mnithishvelan@gmail.com \
--to=mnithishvelan@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=guojy.bj@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®