From: Zach Schneider <me@zachschneider.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Zach Schneider <me@zachschneider.com>
Subject: [PATCH 1/2] staging: rtl8723bs: remove remaining comparisons to true/false
Date: Tue, 13 Oct 2026 16:41:28 -0500 [thread overview]
Message-ID: <20261013214129.699212-1-me@zachschneider.com> (raw)
Checkpatch reports "Using comparison to true/false is error prone"
in rtw_wlan_util.c, hal_com.c, hal_intf.c, odm.c and
ioctl_cfg80211.c. Replace "x == true" with "x" and "x == false"
with "!x".
bwmode_updated, bDisableSWChannelPlan and the HAL_DEF_MACID_SLEEP
value are u8, and rtw_validate_ssid() returns u8, but they only ever
hold true or false. ODM_RAStateCheck() returns bool. This does not
change behavior.
Assisted-by: LLM
Signed-off-by: Zach Schneider <me@zachschneider.com>
---
drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +-
drivers/staging/rtl8723bs/hal/hal_com.c | 2 +-
drivers/staging/rtl8723bs/hal/hal_intf.c | 4 ++--
drivers/staging/rtl8723bs/hal/odm.c | 2 +-
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 9feab9ab7545..369a59fc2407 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -865,7 +865,7 @@ static void bwmode_update_check(struct adapter *padapter, struct ndis_80211_var_
pmlmeinfo->bwmode_updated = false;
}
- if (true == pmlmeinfo->bwmode_updated) {
+ if (pmlmeinfo->bwmode_updated) {
struct sta_info *psta;
struct wlan_bssid_ex *cur_network = &pmlmeinfo->network;
struct sta_priv *pstapriv = &padapter->stapriv;
diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index 656c75ded16f..25df9f17ac47 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -81,7 +81,7 @@ u8 hal_com_config_channel_plan(
}
if (
- (false == pHalData->bDisableSWChannelPlan) &&
+ !pHalData->bDisableSWChannelPlan &&
rtw_is_channel_plan_valid(sw_channel_plan)
)
chnlPlan = sw_channel_plan;
diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c
index d47337118530..3e0d90490259 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -256,7 +256,7 @@ s32 rtw_hal_macid_sleep(struct adapter *padapter, u32 macid)
support = false;
rtw_hal_get_def_var(padapter, HAL_DEF_MACID_SLEEP, &support);
- if (false == support)
+ if (!support)
return _FAIL;
rtw_hal_set_hwreg(padapter, HW_VAR_MACID_SLEEP, (u8 *)&macid);
@@ -270,7 +270,7 @@ s32 rtw_hal_macid_wakeup(struct adapter *padapter, u32 macid)
support = false;
rtw_hal_get_def_var(padapter, HAL_DEF_MACID_SLEEP, &support);
- if (false == support)
+ if (!support)
return _FAIL;
rtw_hal_set_hwreg(padapter, HW_VAR_MACID_WAKEUP, (u8 *)&macid);
diff --git a/drivers/staging/rtl8723bs/hal/odm.c b/drivers/staging/rtl8723bs/hal/odm.c
index 9356ea858ddf..4352f58f3674 100644
--- a/drivers/staging/rtl8723bs/hal/odm.c
+++ b/drivers/staging/rtl8723bs/hal/odm.c
@@ -270,7 +270,7 @@ static void odm_RefreshRateAdaptiveMaskCE(struct dm_odm_t *pDM_Odm)
if (is_multicast_ether_addr(pstat->hwaddr)) /* if (psta->mac_id == 1) */
continue;
- if (true == ODM_RAStateCheck(pDM_Odm, pstat->rssi_stat.UndecoratedSmoothedPWDB, false, &pstat->rssi_level)) {
+ if (ODM_RAStateCheck(pDM_Odm, pstat->rssi_stat.UndecoratedSmoothedPWDB, false, &pstat->rssi_level)) {
rtw_hal_update_ra_mask(pstat, pstat->rssi_level);
}
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 91d98418c0c1..c72ec53e6997 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -1121,7 +1121,7 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter)
/* report network only if the current channel set contains the channel to which this network belongs */
if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.configuration.ds_config) >= 0
- && true == rtw_validate_ssid(&pnetwork->network.ssid)) {
+ && rtw_validate_ssid(&pnetwork->network.ssid)) {
rtw_cfg80211_inform_bss(padapter, pnetwork);
}
}
--
2.56.0
next reply other threads:[~2026-10-13 21:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 21:41 Zach Schneider [this message]
2026-10-13 21:41 ` [PATCH 2/2] staging: rtl8723bs: fix long line and braces in odm.c Zach Schneider
2026-10-14 4:56 ` [PATCH 1/2] staging: rtl8723bs: remove remaining comparisons to true/false Greg Kroah-Hartman
2026-10-14 13:03 ` Zach Schneider
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=20261013214129.699212-1-me@zachschneider.com \
--to=me@zachschneider.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
all inboxes | Powered by JetHome®