From: Raushan Kumar <mitramaurya80@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Raushan Kumar <mitramaurya80@gmail.com>
Subject: [PATCH] staging: rtl8723bs: remove unnecessary braces in HalBtc8723b2Ant.c
Date: Mon, 10 Aug 2026 00:22:50 +0530 [thread overview]
Message-ID: <20260809185250.347772-1-mitramaurya80@gmail.com> (raw)
Remove unnecessary curly braces around single statement if/else
blocks in halbtc8723b2ant_BtRssiState() and
halbtc8723b2ant_WifiRssiState(), as flagged by checkpatch.pl.
Signed-off-by: Raushan Kumar <mitramaurya80@gmail.com>
---
.../staging/rtl8723bs/hal/HalBtc8723b2Ant.c | 50 ++++++++-----------
1 file changed, 20 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c b/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c
index 6da6940c9043..426662d8ba79 100644
--- a/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c
+++ b/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c
@@ -35,49 +35,43 @@ static u8 halbtc8723b2ant_BtRssiState(
(pCoexSta->preBtRssiState == BTC_RSSI_STATE_LOW) ||
(pCoexSta->preBtRssiState == BTC_RSSI_STATE_STAY_LOW)
) {
- if (btRssi >= (rssiThresh + BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT)) {
+ if (btRssi >= (rssiThresh + BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT))
btRssiState = BTC_RSSI_STATE_HIGH;
- } else {
+ else
btRssiState = BTC_RSSI_STATE_STAY_LOW;
- }
} else {
- if (btRssi < rssiThresh) {
+ if (btRssi < rssiThresh)
btRssiState = BTC_RSSI_STATE_LOW;
- } else {
+ else
btRssiState = BTC_RSSI_STATE_STAY_HIGH;
- }
}
} else if (levelNum == 3) {
- if (rssiThresh > rssiThresh1) {
+ if (rssiThresh > rssiThresh1)
return pCoexSta->preBtRssiState;
- }
if (
(pCoexSta->preBtRssiState == BTC_RSSI_STATE_LOW) ||
(pCoexSta->preBtRssiState == BTC_RSSI_STATE_STAY_LOW)
) {
- if (btRssi >= (rssiThresh + BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT)) {
+ if (btRssi >= (rssiThresh + BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT))
btRssiState = BTC_RSSI_STATE_MEDIUM;
- } else {
+ else
btRssiState = BTC_RSSI_STATE_STAY_LOW;
- }
} else if (
(pCoexSta->preBtRssiState == BTC_RSSI_STATE_MEDIUM) ||
(pCoexSta->preBtRssiState == BTC_RSSI_STATE_STAY_MEDIUM)
) {
- if (btRssi >= (rssiThresh1 + BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT)) {
+ if (btRssi >= (rssiThresh1 + BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT))
btRssiState = BTC_RSSI_STATE_HIGH;
- } else if (btRssi < rssiThresh) {
+ else if (btRssi < rssiThresh)
btRssiState = BTC_RSSI_STATE_LOW;
- } else {
+ else
btRssiState = BTC_RSSI_STATE_STAY_MEDIUM;
- }
} else {
- if (btRssi < rssiThresh1) {
+ if (btRssi < rssiThresh1)
btRssiState = BTC_RSSI_STATE_MEDIUM;
- } else {
+ else
btRssiState = BTC_RSSI_STATE_STAY_HIGH;
- }
}
}
@@ -110,37 +104,33 @@ static u8 halbtc8723b2ant_WifiRssiState(
wifiRssiState = BTC_RSSI_STATE_STAY_LOW;
}
} else {
- if (wifiRssi < rssiThresh) {
+ if (wifiRssi < rssiThresh)
wifiRssiState = BTC_RSSI_STATE_LOW;
- } else {
+ else
wifiRssiState = BTC_RSSI_STATE_STAY_HIGH;
- }
}
} else if (levelNum == 3) {
- if (rssiThresh > rssiThresh1) {
+ if (rssiThresh > rssiThresh1)
return pCoexSta->preWifiRssiState[index];
- }
if (
(pCoexSta->preWifiRssiState[index] == BTC_RSSI_STATE_LOW) ||
(pCoexSta->preWifiRssiState[index] == BTC_RSSI_STATE_STAY_LOW)
) {
- if (wifiRssi >= (rssiThresh + BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT)) {
+ if (wifiRssi >= (rssiThresh + BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT))
wifiRssiState = BTC_RSSI_STATE_MEDIUM;
- } else {
+ else
wifiRssiState = BTC_RSSI_STATE_STAY_LOW;
- }
} else if (
(pCoexSta->preWifiRssiState[index] == BTC_RSSI_STATE_MEDIUM) ||
(pCoexSta->preWifiRssiState[index] == BTC_RSSI_STATE_STAY_MEDIUM)
) {
- if (wifiRssi >= (rssiThresh1 + BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT)) {
+ if (wifiRssi >= (rssiThresh1 + BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT))
wifiRssiState = BTC_RSSI_STATE_HIGH;
- } else if (wifiRssi < rssiThresh) {
+ else if (wifiRssi < rssiThresh)
wifiRssiState = BTC_RSSI_STATE_LOW;
- } else {
+ else
wifiRssiState = BTC_RSSI_STATE_STAY_MEDIUM;
- }
} else {
if (wifiRssi < rssiThresh1) {
wifiRssiState = BTC_RSSI_STATE_MEDIUM;
--
2.55.0
next reply other threads:[~2026-08-09 18:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-09 18:52 Raushan Kumar [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-08-10 7:09 [PATCH] staging: rtl8723bs: remove unnecessary braces in HalBtc8723b2Ant.c Raushan Kumar
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=20260809185250.347772-1-mitramaurya80@gmail.com \
--to=mitramaurya80@gmail.com \
--cc=gregkh@linuxfoundation.org \
--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