* [PATCH 0/3] staging: rtl8723bs: fix multiple coding style issues
@ 2026-01-14 9:49 Archit Anant
2026-01-14 9:49 ` [PATCH 1/3] staging: rtl8723bs: fix spacing around operators Archit Anant
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Archit Anant @ 2026-01-14 9:49 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, ArchitAnant
From: ArchitAnant <architanant5@gmail.com>
This patch series fixes several coding style issues in rtw_cmd.c
identified by checkpatch.pl.
Changes include:
- Adding missing spaces around operators.
- Removing unnecessary blank lines.
- Fixing alignment to match open parenthesis.
ArchitAnant (3):
staging: rtl8723bs: fix spacing around operators
staging: rtl8723bs: remove unnecessary blank lines
staging: rtl8723bs: fix alignment to match open parenthesis
drivers/staging/rtl8723bs/core/rtw_cmd.c | 56 +++++++++++-------------
1 file changed, 26 insertions(+), 30 deletions(-)
--
2.39.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] staging: rtl8723bs: fix spacing around operators
2026-01-14 9:49 [PATCH 0/3] staging: rtl8723bs: fix multiple coding style issues Archit Anant
@ 2026-01-14 9:49 ` Archit Anant
2026-01-16 13:07 ` Greg KH
2026-01-14 9:49 ` [PATCH 2/3] staging: rtl8723bs: remove unnecessary blank lines Archit Anant
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Archit Anant @ 2026-01-14 9:49 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, ArchitAnant
From: ArchitAnant <architanant5@gmail.com>
Add missing spaces around mathematical and logical operators
(+, -, /, |, ?, :) to comply with the Linux kernel coding style.
Issue identified by checkpatch.pl.
Signed-off-by: ArchitAnant <architanant5@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 28 ++++++++++++------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index ef2d92b5588a..03274738c94e 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -175,7 +175,7 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
if (!pcmdpriv->cmd_allocated_buf)
return -ENOMEM;
- pcmdpriv->cmd_buf = pcmdpriv->cmd_allocated_buf + CMDBUFF_ALIGN_SZ - ((SIZE_PTR)(pcmdpriv->cmd_allocated_buf) & (CMDBUFF_ALIGN_SZ-1));
+ pcmdpriv->cmd_buf = pcmdpriv->cmd_allocated_buf + CMDBUFF_ALIGN_SZ - ((SIZE_PTR)(pcmdpriv->cmd_allocated_buf) & (CMDBUFF_ALIGN_SZ - 1));
pcmdpriv->rsp_allocated_buf = rtw_zmalloc(MAX_RSPSZ + 4);
@@ -204,7 +204,7 @@ int rtw_init_evt_priv(struct evt_priv *pevtpriv)
_init_workitem(&pevtpriv->c2h_wk, c2h_wk_callback, NULL);
pevtpriv->c2h_wk_alive = false;
- pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN+1);
+ pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN + 1);
if (!pevtpriv->c2h_queue)
return -ENOMEM;
@@ -696,7 +696,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
t_len = sizeof(struct wlan_bssid_ex);
/* for hidden ap to set fw_state here */
- if (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) != true) {
+ if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_ADHOC_STATE) != true) {
switch (ndis_network_mode) {
case Ndis802_11IBSS:
set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
@@ -721,10 +721,10 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
psecuritypriv->authenticator_ie[0] = (unsigned char)psecnetwork->ie_length;
- if ((psecnetwork->ie_length-12) < (256-1))
- memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->ies[12], psecnetwork->ie_length-12);
+ if ((psecnetwork->ie_length - 12) < (256 - 1))
+ memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->ies[12], psecnetwork->ie_length - 12);
else
- memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->ies[12], (256-1));
+ memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->ies[12], (256 - 1));
psecnetwork->ie_length = 0;
/* Added by Albert 2009/02/18 */
@@ -751,7 +751,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
}
phtpriv->ht_option = false;
- ptmp = rtw_get_ie(&pnetwork->network.ies[12], WLAN_EID_HT_CAPABILITY, &tmp_len, pnetwork->network.ie_length-12);
+ ptmp = rtw_get_ie(&pnetwork->network.ies[12], WLAN_EID_HT_CAPABILITY, &tmp_len, pnetwork->network.ie_length - 12);
if (pregistrypriv->ht_enable && ptmp && tmp_len > 0) {
/* Added by Albert 2010/06/23 */
/* For the WEP mode, we will use the bg mode to do the connection to avoid some IOT issue. */
@@ -765,7 +765,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
/* rtw_restructure_ht_ie */
rtw_restructure_ht_ie(padapter, &pnetwork->network.ies[12], &psecnetwork->ies[0],
- pnetwork->network.ie_length-12, &psecnetwork->ie_length,
+ pnetwork->network.ie_length - 12, &psecnetwork->ie_length,
pnetwork->network.configuration.ds_config);
}
}
@@ -1122,8 +1122,8 @@ static void collect_traffic_statistics(struct adapter *padapter)
pdvobjpriv->traffic_stat.last_tx_bytes = pdvobjpriv->traffic_stat.tx_bytes;
pdvobjpriv->traffic_stat.last_rx_bytes = pdvobjpriv->traffic_stat.rx_bytes;
- pdvobjpriv->traffic_stat.cur_tx_tp = (u32)(pdvobjpriv->traffic_stat.cur_tx_bytes * 8/2/1024/1024);
- pdvobjpriv->traffic_stat.cur_rx_tp = (u32)(pdvobjpriv->traffic_stat.cur_rx_bytes * 8/2/1024/1024);
+ pdvobjpriv->traffic_stat.cur_tx_tp = (u32)(pdvobjpriv->traffic_stat.cur_tx_bytes * 8 / 2 / 1024 / 1024);
+ pdvobjpriv->traffic_stat.cur_rx_tp = (u32)(pdvobjpriv->traffic_stat.cur_rx_bytes * 8 / 2 / 1024 / 1024);
}
u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
@@ -1598,9 +1598,9 @@ static void rtw_btinfo_hdl(struct adapter *adapter, u8 *buf, u16 buf_len)
cmd_idx = info->cid;
- if (info->len > buf_len-2) {
+ if (info->len > buf_len - 2) {
rtw_warn_on(1);
- len = buf_len-2;
+ len = buf_len - 2;
} else {
len = info->len;
}
@@ -1610,7 +1610,7 @@ static void rtw_btinfo_hdl(struct adapter *adapter, u8 *buf, u16 buf_len)
buf[1] = 0;
else if (cmd_idx == BTINFO_BT_AUTO_RPT)
buf[1] = 2;
- hal_btcoex_BtInfoNotify(adapter, len+1, &buf[1]);
+ hal_btcoex_BtInfoNotify(adapter, len + 1, &buf[1]);
}
u8 rtw_c2h_packet_wk_cmd(struct adapter *padapter, u8 *pbuf, u16 length)
@@ -1670,7 +1670,7 @@ u8 rtw_c2h_wk_cmd(struct adapter *padapter, u8 *c2h_evt)
pdrvextra_cmd_parm->ec_id = C2H_WK_CID;
pdrvextra_cmd_parm->type = 0;
- pdrvextra_cmd_parm->size = c2h_evt?16:0;
+ pdrvextra_cmd_parm->size = c2h_evt ? 16 : 0;
pdrvextra_cmd_parm->pbuf = c2h_evt;
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
--
2.39.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] staging: rtl8723bs: remove unnecessary blank lines
2026-01-14 9:49 [PATCH 0/3] staging: rtl8723bs: fix multiple coding style issues Archit Anant
2026-01-14 9:49 ` [PATCH 1/3] staging: rtl8723bs: fix spacing around operators Archit Anant
@ 2026-01-14 9:49 ` Archit Anant
2026-01-14 9:49 ` [PATCH 3/3] staging: rtl8723bs: fix alignment to match open parenthesis Archit Anant
2026-01-16 13:08 ` [PATCH 0/3] staging: rtl8723bs: fix multiple coding style issues Greg KH
3 siblings, 0 replies; 6+ messages in thread
From: Archit Anant @ 2026-01-14 9:49 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, ArchitAnant
From: ArchitAnant <architanant5@gmail.com>
Remove blank lines before closing braces to comply with
the Linux kernel coding style.
Issue identified by checkpatch.pl.
Signed-off-by: ArchitAnant <architanant5@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index 03274738c94e..f7b5448415ea 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -1002,6 +1002,7 @@ u8 rtw_addbareq_cmd(struct adapter *padapter, u8 tid, u8 *addr)
exit:
return res;
}
+
/* add for CONFIG_IEEE80211W, none 11w can use it */
u8 rtw_reset_securitypriv_cmd(struct adapter *padapter)
{
@@ -1224,7 +1225,6 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
pmlmepriv->LinkDetectInfo.bHigherBusyTxTraffic = bHigherBusyTxTraffic;
return bEnterPS;
-
}
static void dynamic_chk_wk_hdl(struct adapter *padapter)
@@ -1446,7 +1446,6 @@ u8 rtw_dm_ra_mask_wk_cmd(struct adapter *padapter, u8 *psta)
exit:
return res;
-
}
u8 rtw_ps_cmd(struct adapter *padapter)
@@ -1516,9 +1515,7 @@ static void rtw_chk_hi_queue_hdl(struct adapter *padapter)
} else {/* re check again */
rtw_chk_hi_queue_cmd(padapter);
}
-
}
-
}
u8 rtw_chk_hi_queue_cmd(struct adapter *padapter)
@@ -1877,7 +1874,6 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
/* we will set _FW_LINKED when there is one more sat to join us (rtw_stassoc_event_callback) */
-
}
createbss_cmd_fail:
--
2.39.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] staging: rtl8723bs: fix alignment to match open parenthesis
2026-01-14 9:49 [PATCH 0/3] staging: rtl8723bs: fix multiple coding style issues Archit Anant
2026-01-14 9:49 ` [PATCH 1/3] staging: rtl8723bs: fix spacing around operators Archit Anant
2026-01-14 9:49 ` [PATCH 2/3] staging: rtl8723bs: remove unnecessary blank lines Archit Anant
@ 2026-01-14 9:49 ` Archit Anant
2026-01-16 13:08 ` [PATCH 0/3] staging: rtl8723bs: fix multiple coding style issues Greg KH
3 siblings, 0 replies; 6+ messages in thread
From: Archit Anant @ 2026-01-14 9:49 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, ArchitAnant
From: ArchitAnant <architanant5@gmail.com>
Align arguments and conditions with the open parenthesis of the
preceding line to comply with the Linux kernel coding style.
Issue identified by checkpatch.pl.
Signed-off-by: ArchitAnant <architanant5@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index f7b5448415ea..0044b54e7fbe 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -305,7 +305,7 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
bAllow = true;
if ((!pcmdpriv->padapter->hw_init_completed && !bAllow) ||
- !atomic_read(&pcmdpriv->cmdthd_running)) /* com_thread not running */
+ !atomic_read(&pcmdpriv->cmdthd_running)) /* com_thread not running */
return _FAIL;
return _SUCCESS;
@@ -363,8 +363,8 @@ void rtw_free_cmd_obj(struct cmd_obj *pcmd)
void rtw_stop_cmd_thread(struct adapter *adapter)
{
if (adapter->cmdThread &&
- atomic_read(&adapter->cmdpriv.cmdthd_running) &&
- adapter->cmdpriv.stop_req == 0) {
+ atomic_read(&adapter->cmdpriv.cmdthd_running) &&
+ adapter->cmdpriv.stop_req == 0) {
adapter->cmdpriv.stop_req = 1;
complete(&adapter->cmdpriv.cmd_queue_comp);
wait_for_completion(&adapter->cmdpriv.terminate_cmdthread_comp);
@@ -523,7 +523,7 @@ int rtw_cmd_thread(void *context)
*/
u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, int ssid_num,
- struct rtw_ieee80211_channel *ch, int ch_num)
+ struct rtw_ieee80211_channel *ch, int ch_num)
{
u8 res = _FAIL;
struct cmd_obj *ph2c;
@@ -757,16 +757,16 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
/* For the WEP mode, we will use the bg mode to do the connection to avoid some IOT issue. */
/* Especially for Realtek 8192u SoftAP. */
if ((padapter->securitypriv.dot11PrivacyAlgrthm != _WEP40_) &&
- (padapter->securitypriv.dot11PrivacyAlgrthm != _WEP104_) &&
- (padapter->securitypriv.dot11PrivacyAlgrthm != _TKIP_)) {
+ (padapter->securitypriv.dot11PrivacyAlgrthm != _WEP104_) &&
+ (padapter->securitypriv.dot11PrivacyAlgrthm != _TKIP_)) {
rtw_ht_use_default_setting(padapter);
rtw_build_wmm_ie_ht(padapter, &psecnetwork->ies[12], &psecnetwork->ie_length);
/* rtw_restructure_ht_ie */
rtw_restructure_ht_ie(padapter, &pnetwork->network.ies[12], &psecnetwork->ies[0],
- pnetwork->network.ie_length - 12, &psecnetwork->ie_length,
- pnetwork->network.configuration.ds_config);
+ pnetwork->network.ie_length - 12, &psecnetwork->ie_length,
+ pnetwork->network.configuration.ds_config);
}
}
@@ -1149,7 +1149,7 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
BusyThreshold = BusyThresholdLow;
if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > BusyThreshold ||
- pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > BusyThreshold) {
+ pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > BusyThreshold) {
bBusyTraffic = true;
if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > pmlmepriv->LinkDetectInfo.NumTxOkInPeriod)
@@ -1160,7 +1160,7 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
/* Higher Tx/Rx data. */
if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > 4000 ||
- pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 4000) {
+ pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 4000) {
bHigherBusyTraffic = true;
if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > pmlmepriv->LinkDetectInfo.NumTxOkInPeriod)
@@ -1171,7 +1171,7 @@ u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
/* check traffic for powersaving. */
if (((pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod + pmlmepriv->LinkDetectInfo.NumTxOkInPeriod) > 8) ||
- (pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 2)) {
+ (pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 2)) {
bEnterPS = false;
if (bBusyTraffic) {
@@ -1264,7 +1264,7 @@ void lps_ctrl_wk_hdl(struct adapter *padapter, u8 lps_ctrl_type)
u8 mstatus;
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) ||
- check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
+ check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
return;
}
--
2.39.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] staging: rtl8723bs: fix spacing around operators
2026-01-14 9:49 ` [PATCH 1/3] staging: rtl8723bs: fix spacing around operators Archit Anant
@ 2026-01-16 13:07 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2026-01-16 13:07 UTC (permalink / raw)
To: Archit Anant; +Cc: linux-staging, linux-kernel
On Wed, Jan 14, 2026 at 03:19:47PM +0530, Archit Anant wrote:
> From: ArchitAnant <architanant5@gmail.com>
>
> Add missing spaces around mathematical and logical operators
> (+, -, /, |, ?, :) to comply with the Linux kernel coding style.
>
> Issue identified by checkpatch.pl.
>
> Signed-off-by: ArchitAnant <architanant5@gmail.com>
> ---
> drivers/staging/rtl8723bs/core/rtw_cmd.c | 28 ++++++++++++------------
> 1 file changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
> index ef2d92b5588a..03274738c94e 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
> @@ -175,7 +175,7 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
> if (!pcmdpriv->cmd_allocated_buf)
> return -ENOMEM;
>
> - pcmdpriv->cmd_buf = pcmdpriv->cmd_allocated_buf + CMDBUFF_ALIGN_SZ - ((SIZE_PTR)(pcmdpriv->cmd_allocated_buf) & (CMDBUFF_ALIGN_SZ-1));
> + pcmdpriv->cmd_buf = pcmdpriv->cmd_allocated_buf + CMDBUFF_ALIGN_SZ - ((SIZE_PTR)(pcmdpriv->cmd_allocated_buf) & (CMDBUFF_ALIGN_SZ - 1));
Why are there additional ' ' around the first '+' character?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] staging: rtl8723bs: fix multiple coding style issues
2026-01-14 9:49 [PATCH 0/3] staging: rtl8723bs: fix multiple coding style issues Archit Anant
` (2 preceding siblings ...)
2026-01-14 9:49 ` [PATCH 3/3] staging: rtl8723bs: fix alignment to match open parenthesis Archit Anant
@ 2026-01-16 13:08 ` Greg KH
3 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2026-01-16 13:08 UTC (permalink / raw)
To: Archit Anant; +Cc: linux-staging, linux-kernel
On Wed, Jan 14, 2026 at 03:19:46PM +0530, Archit Anant wrote:
> From: ArchitAnant <architanant5@gmail.com>
>
> This patch series fixes several coding style issues in rtw_cmd.c
> identified by checkpatch.pl.
>
> Changes include:
> - Adding missing spaces around operators.
> - Removing unnecessary blank lines.
> - Fixing alignment to match open parenthesis.
>
> ArchitAnant (3):
> staging: rtl8723bs: fix spacing around operators
> staging: rtl8723bs: remove unnecessary blank lines
> staging: rtl8723bs: fix alignment to match open parenthesis
>
> drivers/staging/rtl8723bs/core/rtw_cmd.c | 56 +++++++++++-------------
> 1 file changed, 26 insertions(+), 30 deletions(-)
>
> --
> 2.39.5
>
>
Only a portion of this series applied to my tree, please rebase and
resend the remaining ones.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-01-16 13:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-14 9:49 [PATCH 0/3] staging: rtl8723bs: fix multiple coding style issues Archit Anant
2026-01-14 9:49 ` [PATCH 1/3] staging: rtl8723bs: fix spacing around operators Archit Anant
2026-01-16 13:07 ` Greg KH
2026-01-14 9:49 ` [PATCH 2/3] staging: rtl8723bs: remove unnecessary blank lines Archit Anant
2026-01-14 9:49 ` [PATCH 3/3] staging: rtl8723bs: fix alignment to match open parenthesis Archit Anant
2026-01-16 13:08 ` [PATCH 0/3] staging: rtl8723bs: fix multiple coding style issues Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox