From: Jennifer Guo <guojy.bj@gmail.com>
To: linux-staging@lists.linux.dev
Cc: gregkh@linuxfoundation.org, mokshpanicker.7@gmail.com,
Jennifer Guo <guojy.bj@gmail.com>
Subject: [PATCH] staging: rtl8723bs: fix unbalanced braces in 3 files
Date: Mon, 11 May 2026 22:46:55 -0700 [thread overview]
Message-ID: <20260512054655.4800-1-guojy.bj@gmail.com> (raw)
Add missing braces to if/else statements to comply with kernel coding
style.
This fixes the following checkpatch.pl checks:
- CHECK: Unbalanced braces around else statement
- CHECK: braces {} should be used on all arms of this statement
Signed-off-by: Jennifer Guo <guojy.bj@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_efuse.c | 4 ++--
drivers/staging/rtl8723bs/core/rtw_mlme.c | 17 ++++++++++-------
drivers/staging/rtl8723bs/core/rtw_xmit.c | 3 ++-
3 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c b/drivers/staging/rtl8723bs/core/rtw_efuse.c
index 803a608b74fa..a40d6eab7249 100644
--- a/drivers/staging/rtl8723bs/core/rtw_efuse.c
+++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c
@@ -76,9 +76,9 @@ u16 Address)
break;
}
return rtw_read8(Adapter, EFUSE_CTRL);
- } else
+ } else {
return 0xFF;
-
+ }
} /* rtw_efuse_read_1_byte */
/* 11/16/2008 MH Read one byte from real Efuse. */
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 963b53027c68..6be53e6df1f5 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -742,9 +742,9 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
} else {
pmlmepriv->to_join = true;
}
- } else
+ } else {
rtw_indicate_disconnect(adapter);
-
+ }
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
}
}
@@ -1554,15 +1554,17 @@ void rtw_mlme_reset_auto_scan_int(struct adapter *adapter)
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
- if (pmlmeinfo->VHT_enable) /* disable auto scan when connect to 11AC AP */
+ if (pmlmeinfo->VHT_enable) {
+ /* disable auto scan when connect to 11AC AP */
mlme->auto_scan_int_ms = 0;
- else if (adapter->registrypriv.wifi_spec && is_client_associated_to_ap(adapter))
+ } else if (adapter->registrypriv.wifi_spec && is_client_associated_to_ap(adapter)) {
mlme->auto_scan_int_ms = 60 * 1000;
- else if (rtw_chk_roam_flags(adapter, RTW_ROAM_ACTIVE)) {
+ } else if (rtw_chk_roam_flags(adapter, RTW_ROAM_ACTIVE)) {
if (check_fwstate(mlme, WIFI_STATION_STATE) && check_fwstate(mlme, _FW_LINKED))
mlme->auto_scan_int_ms = mlme->roam_scan_int_ms;
- } else
+ } else {
mlme->auto_scan_int_ms = 0; /* disabled */
+ }
}
static void rtw_auto_scan_handler(struct adapter *padapter)
@@ -2282,9 +2284,10 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
operation_bw = padapter->mlmeextpriv.cur_bwmode;
if (operation_bw > CHANNEL_WIDTH_40)
operation_bw = CHANNEL_WIDTH_40;
- } else
+ } else {
/* TDLS: TODO 40? */
operation_bw = CHANNEL_WIDTH_40;
+ }
} else {
p = rtw_get_ie(in_ie, WLAN_EID_HT_OPERATION, &ielen, in_len);
if (p && (ielen == sizeof(struct ieee80211_ht_addt_info))) {
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 458e471535ad..a28830b4f4e7 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -2037,8 +2037,9 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe)
} else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_ALL)
allow = true;
else if (registry->hiq_filter == RTW_HIQ_FILTER_DENY_ALL) {
- } else
+ } else {
WARN_ON(1);
+ }
return allow;
}
--
2.34.1
reply other threads:[~2026-05-12 5:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260512054655.4800-1-guojy.bj@gmail.com \
--to=guojy.bj@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-staging@lists.linux.dev \
--cc=mokshpanicker.7@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