From: Michael Huang <tehsiu.huang@gmail.com>
To: gregkh@linuxfoundation.org
Cc: straube.linux@gmail.com, hansg@kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Michael Huang <tehsiu.huang@gmail.com>
Subject: [PATCH] staging: rtl8723bs: fix coding style issues in rtw_mlme.c
Date: Thu, 22 Jan 2026 16:32:05 -0800 [thread overview]
Message-ID: <20260123003205.33898-1-tehsiu.huang@gmail.com> (raw)
This patch fixes several checkpatch.pl issues:
1. Remove redundant else after break/return.
2. Remove unnecessary boolean comparisons (== true/false).
3. Fix trailing whitespaces and overly deep indentation.
Signed-off-by: Michael Huang <tehsiu.huang@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 98704179ad35..71a0efe49bdd 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 {
@@ -1560,10 +1559,6 @@ void _rtw_join_timeout_handler(struct timer_list *t)
do_join_r = rtw_do_join(adapter);
if (do_join_r != _SUCCESS)
continue;
-
- break;
- } else {
- rtw_indicate_disconnect(adapter);
break;
}
}
@@ -2018,7 +2013,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
next reply other threads:[~2026-01-23 0:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 0:32 Michael Huang [this message]
2026-01-23 8:57 ` [PATCH] staging: rtl8723bs: fix coding style issues in rtw_mlme.c Dan Carpenter
2026-01-23 9:57 ` [PATCH v2 0/2] staging: rtl8723bs: fix coding style and logic " Michael Huang
2026-01-23 9:57 ` [PATCH v2 1/2] staging: rtl8723bs: remove unnecessary boolean comparisons and whitespaces Michael Huang
2026-01-27 14:42 ` Greg KH
2026-01-23 9:57 ` [PATCH v2 2/2] staging: rtl8723bs: remove redundant else after break Michael Huang
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=20260123003205.33898-1-tehsiu.huang@gmail.com \
--to=tehsiu.huang@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=straube.linux@gmail.com \
/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