[PATCH 6/9] staging: rtl8723bs: fix Yoda conditions and == false comparisons

From: Marc Finkelbaum

Date: Tue Apr 14 2026 - 06:24:27 EST


Replace reversed comparisons with natural-order equivalents:
- '0xFF == hw_channel_plan' -> 'hw_channel_plan == 0xFF'
- 'false == pHalData->bDisableSWChannelPlan' -> '!pHalData->...'
- 'is_supported_24g(...) == false' -> '!is_supported_24g(...)'

The multi-line if condition around bDisableSWChannelPlan is also
reformatted to standard kernel one-line style.

No functional change.

Signed-off-by: Marc Finkelbaum <regpacy@xxxxxxxxx>
---
drivers/staging/rtl8723bs/hal/hal_com.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index fcfcdfd079da..dc5e6a58fd9d 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -105,7 +105,7 @@ u8 hal_com_config_channel_plan(
pHalData->bDisableSWChannelPlan = false;
chnlPlan = def_channel_plan;

- if (0xFF == hw_channel_plan)
+ if (hw_channel_plan == 0xFF)
AutoLoadFail = true;

if (!AutoLoadFail) {
@@ -120,10 +120,8 @@ u8 hal_com_config_channel_plan(
}
}

- if (
- (false == pHalData->bDisableSWChannelPlan) &&
- rtw_is_channel_plan_valid(sw_channel_plan)
- )
+ if ((!pHalData->bDisableSWChannelPlan) &&
+ rtw_is_channel_plan_valid(sw_channel_plan))
chnlPlan = sw_channel_plan;

return chnlPlan;
@@ -134,7 +132,7 @@ bool HAL_IsLegalChannel(struct adapter *adapter, u32 Channel)
bool bLegalChannel = true;

if ((Channel <= 14) && (Channel >= 1)) {
- if (is_supported_24g(adapter->registrypriv.wireless_mode) == false)
+ if (!is_supported_24g(adapter->registrypriv.wireless_mode))
bLegalChannel = false;
} else {
bLegalChannel = false;
--
2.53.0