* [PATCH] staging: rtl8723bs: fix long lines in core files
@ 2026-03-19 11:38 Haoyu Lu
2026-03-19 11:58 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Haoyu Lu @ 2026-03-19 11:38 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel, haoyu.lu
From: "haoyu.lu" <hechushiguitu666@gmail.com>
Fix lines longer than 80 characters in rtl8723bs core files:
- drivers/staging/rtl8723bs/core/rtw_ap.c
- drivers/staging/rtl8723bs/core/rtw_cmd.c
Split long comment lines into multiple lines and extract
repeated expressions to temporary variables to reduce line length.
This addresses the TODO item "checkpatch.pl fixes - most of the
remaining ones are lines too long."
Signed-off-by: haoyu.lu <hechushiguitu666@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_ap.c | 18 +++++++++++-------
drivers/staging/rtl8723bs/core/rtw_cmd.c | 9 ++++++---
2 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
index 864cd8b6d1f1..0d40c8f45899 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -270,7 +270,8 @@ void expire_timeout_chk(struct adapter *padapter)
u8 backup_oper_channel = 0;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
- /* switch to correct channel of current network before issue keep-alive frames */
+ /* switch to correct channel of current network before issue */
+ /* keep-alive frames */
if (rtw_get_oper_ch(padapter) != pmlmeext->cur_channel) {
backup_oper_channel = rtw_get_oper_ch(padapter);
r8723bs_select_channel(padapter, pmlmeext->cur_channel);
@@ -610,9 +611,9 @@ static void update_hw_ht_param(struct adapter *padapter)
* AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
* AMPDU_para [4:2]:Min MPDU Start Spacing
*/
- max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03;
-
- min_MPDU_spacing = (pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x1c) >> 2;
+ u8 ampdu_para = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para;
+ max_AMPDU_len = ampdu_para & 0x03;
+ min_MPDU_spacing = (ampdu_para & 0x1c) >> 2;
rtw_hal_set_hwreg(padapter, HW_VAR_AMPDU_MIN_SPACE, (u8 *)(&min_MPDU_spacing));
@@ -839,7 +840,8 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
/* beacon interval */
/* ie + 8; 8: TimeStamp, 2: Beacon Interval 2:Capability */
p = rtw_get_beacon_interval_from_ie(ie);
- /* pbss_network->configuration.beacon_period = le16_to_cpu(*(unsigned short*)p); */
+ /* pbss_network->configuration.beacon_period = le16_to_cpu */
+ /* (*(unsigned short*)p); */
pbss_network->configuration.beacon_period = get_unaligned_le16(p);
/* capability */
@@ -1497,7 +1499,8 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
switch (ie_id) {
case 0xFF:
- update_bcn_fixed_ie(padapter);/* 8: TimeStamp, 2: Beacon Interval 2:Capability */
+ update_bcn_fixed_ie(padapter);
+ /* 8: TimeStamp, 2: Beacon Interval 2:Capability */
break;
@@ -2075,7 +2078,8 @@ void stop_ap_mode(struct adapter *padapter)
pmlmepriv->update_bcn = false;
pmlmeext->bstart_bss = false;
- /* reset and init security priv , this can refine with rtw_reset_securitypriv */
+ /* reset and init security priv, this can refine */
+ /* with rtw_reset_securitypriv */
memset((unsigned char *)&padapter->securitypriv,
0,
sizeof(struct security_priv));
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index abb84f8aecbe..57e6aa433627 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -171,7 +171,8 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
pcmdpriv->cmd_seq = 1;
- pcmdpriv->cmd_allocated_buf = kzalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ, GFP_ATOMIC);
+ pcmdpriv->cmd_allocated_buf = kzalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ,
+ GFP_ATOMIC);
if (!pcmdpriv->cmd_allocated_buf)
return -ENOMEM;
@@ -183,7 +184,8 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
return -ENOMEM;
}
- pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 - ((SIZE_PTR)(pcmdpriv->rsp_allocated_buf) & 3);
+ pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 -
+ ((SIZE_PTR)(pcmdpriv->rsp_allocated_buf) & 3);
pcmdpriv->cmd_issued_cnt = 0;
pcmdpriv->cmd_done_cnt = 0;
@@ -298,7 +300,8 @@ void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj);
int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
{
- u8 bAllow = false; /* set to true to allow enqueuing cmd when hw_init_completed is false */
+ u8 bAllow = false;
+ /* set to true to allow enqueuing cmd when hw_init_completed is false */
if (cmd_obj->cmdcode == GEN_CMD_CODE(_SetChannelPlan))
bAllow = true;
--
2.53.0.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: rtl8723bs: fix long lines in core files
2026-03-19 11:38 [PATCH] staging: rtl8723bs: fix long lines in core files Haoyu Lu
@ 2026-03-19 11:58 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2026-03-19 11:58 UTC (permalink / raw)
To: Haoyu Lu; +Cc: linux-staging, linux-kernel
On Thu, Mar 19, 2026 at 07:38:35PM +0800, Haoyu Lu wrote:
> From: "haoyu.lu" <hechushiguitu666@gmail.com>
>
> Fix lines longer than 80 characters in rtl8723bs core files:
> - drivers/staging/rtl8723bs/core/rtw_ap.c
> - drivers/staging/rtl8723bs/core/rtw_cmd.c
>
> Split long comment lines into multiple lines and extract
> repeated expressions to temporary variables to reduce line length.
>
> This addresses the TODO item "checkpatch.pl fixes - most of the
> remaining ones are lines too long."
>
> Signed-off-by: haoyu.lu <hechushiguitu666@gmail.com>
> ---
> drivers/staging/rtl8723bs/core/rtw_ap.c | 18 +++++++++++-------
> drivers/staging/rtl8723bs/core/rtw_cmd.c | 9 ++++++---
> 2 files changed, 17 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c
> index 864cd8b6d1f1..0d40c8f45899 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_ap.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
> @@ -270,7 +270,8 @@ void expire_timeout_chk(struct adapter *padapter)
> u8 backup_oper_channel = 0;
> struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
>
> - /* switch to correct channel of current network before issue keep-alive frames */
> + /* switch to correct channel of current network before issue */
> + /* keep-alive frames */
This is not the correct style for multi-line comments, sorry.
> if (rtw_get_oper_ch(padapter) != pmlmeext->cur_channel) {
> backup_oper_channel = rtw_get_oper_ch(padapter);
> r8723bs_select_channel(padapter, pmlmeext->cur_channel);
> @@ -610,9 +611,9 @@ static void update_hw_ht_param(struct adapter *padapter)
> * AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
> * AMPDU_para [4:2]:Min MPDU Start Spacing
> */
> - max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03;
> -
> - min_MPDU_spacing = (pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x1c) >> 2;
> + u8 ampdu_para = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para;
> + max_AMPDU_len = ampdu_para & 0x03;
> + min_MPDU_spacing = (ampdu_para & 0x1c) >> 2;
It's not usually a good idea to use a temp variable declaration in the
middle of a function for no good reason, sorry.
So I don't think these changes are really needed.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-19 11:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19 11:38 [PATCH] staging: rtl8723bs: fix long lines in core files Haoyu Lu
2026-03-19 11:58 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox