[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260123095733.49301-2-tehsiu.huang@gmail.com>
Date: Fri, 23 Jan 2026 01:57:32 -0800
From: Michael Huang <tehsiu.huang@...il.com>
To: gregkh@...uxfoundation.org
Cc: dan.carpenter@...aro.org,
straube.linux@...il.com,
hansg@...nel.org,
linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Michael Huang <tehsiu.huang@...il.com>
Subject: [PATCH v2 1/2] staging: rtl8723bs: remove unnecessary boolean comparisons and whitespaces
According to the kernel coding style, explicit comparisons with true
or false are redundant and should be avoided. This patch removes these
comparisons in rtw_mlme.c to improve code clarity. Additionally,
trailing whitespaces are removed to satisfy checkpatch.pl requirements.
Signed-off-by: Michael Huang <tehsiu.huang@...il.com>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 98704179ad35..ed754fdbfe7a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -710,8 +710,8 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
rtw_set_signal_stat_timer(&adapter->recvpriv);
if (pmlmepriv->to_join) {
- if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true)) {
- if (check_fwstate(pmlmepriv, _FW_LINKED) == false) {
+ if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
+ if (!check_fwstate(pmlmepriv, _FW_LINKED)) {
set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
if (rtw_select_and_join_from_scanned_queue(pmlmepriv) == _SUCCESS) {
@@ -1206,10 +1206,9 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
rtw_free_stainfo(adapter, pcur_sta);
ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, pnetwork->network.mac_address);
- if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) {
- if (ptarget_wlan)
- ptarget_wlan->fixed = true;
- }
+ if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) &&
+ ptarget_wlan)
+ ptarget_wlan->fixed = true;
}
} else {
@@ -2018,7 +2017,7 @@ int rtw_restruct_wmm_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_
return ielength;
}
-/* Ported from 8185: IsInPreAuthKeyList().
+/* Ported from 8185: IsInPreAuthKeyList().
* (Renamed from SecIsInPreAuthKeyList(), 2006-10-13.)
* Added by Annie, 2006-05-07.
*
--
2.43.0
Powered by blists - more mailing lists