* [PATCH 1/2] staging: rtl8723bs: remove remaining comparisons to true/false
@ 2026-10-13 21:41 Zach Schneider
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
0 siblings, 2 replies; 4+ messages in thread
From: Zach Schneider @ 2026-10-13 21:41 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel, Zach Schneider
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
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] staging: rtl8723bs: fix long line and braces in odm.c
2026-10-13 21:41 [PATCH 1/2] staging: rtl8723bs: remove remaining comparisons to true/false Zach Schneider
@ 2026-10-13 21:41 ` Zach Schneider
2026-10-14 4:56 ` [PATCH 1/2] staging: rtl8723bs: remove remaining comparisons to true/false Greg Kroah-Hartman
1 sibling, 0 replies; 4+ messages in thread
From: Zach Schneider @ 2026-10-13 21:41 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel, Zach Schneider
Checkpatch reports that the ODM_RAStateCheck() call in
odm_RefreshRateAdaptiveMaskCE() exceeds 100 columns and that the
braces around its single-statement body are not necessary.
Wrap the call arguments onto a second line aligned with the open
parenthesis and drop the unnecessary braces. No functional change.
Assisted-by: LLM
Signed-off-by: Zach Schneider <me@zachschneider.com>
---
drivers/staging/rtl8723bs/hal/odm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/odm.c b/drivers/staging/rtl8723bs/hal/odm.c
index 4352f58f3674..435875f3bef4 100644
--- a/drivers/staging/rtl8723bs/hal/odm.c
+++ b/drivers/staging/rtl8723bs/hal/odm.c
@@ -270,9 +270,9 @@ static void odm_RefreshRateAdaptiveMaskCE(struct dm_odm_t *pDM_Odm)
if (is_multicast_ether_addr(pstat->hwaddr)) /* if (psta->mac_id == 1) */
continue;
- if (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);
- }
}
}
--
2.56.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 1/2] staging: rtl8723bs: remove remaining comparisons to true/false
2026-10-13 21:41 [PATCH 1/2] staging: rtl8723bs: remove remaining comparisons to true/false Zach Schneider
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 ` Greg Kroah-Hartman
2026-10-14 13:03 ` Zach Schneider
1 sibling, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2026-10-14 4:56 UTC (permalink / raw)
To: Zach Schneider; +Cc: linux-staging, linux-kernel
On Tue, Oct 13, 2026 at 04:41:28PM -0500, Zach Schneider wrote:
> 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(-)
Please read:
https://lore.kernel.org/r/2026080354-skater-urgent-31b2@gregkh
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] staging: rtl8723bs: remove remaining comparisons to true/false
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
0 siblings, 0 replies; 4+ messages in thread
From: Zach Schneider @ 2026-10-14 13:03 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel
> Please read:
> https://lore.kernel.org/r/2026080354-skater-urgent-31b2@gregkh
Sorry, I missed that policy. I was trying to learn how the contribution process works end to end, and leaned on an LLM to get through it. Your point makes sense though: the learning is in doing the work myself.
Please drop this series (both 1/2 and 2/2), and I'll come back with patches I've done by hand.
thank you,
Zach Schneider
Mobile: 260.435.9767
https://zachschneider.com/
https://linkedin.com/in/zschneider
On Tuesday, October 13th, 2026 at 11:56 PM, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> On Tue, Oct 13, 2026 at 04:41:28PM -0500, Zach Schneider wrote:
> > 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(-)
>
> Please read:
> https://lore.kernel.org/r/2026080354-skater-urgent-31b2@gregkh
>
> thanks,
>
> greg k-h
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-14 13:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 21:41 [PATCH 1/2] staging: rtl8723bs: remove remaining comparisons to true/false Zach Schneider
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox