Re: [PATCH] staging: rtl8723bs: fix long lines in core files

From: Greg Kroah-Hartman

Date: Thu Mar 19 2026 - 08:00:59 EST


On Thu, Mar 19, 2026 at 07:38:35PM +0800, Haoyu Lu wrote:
> From: "haoyu.lu" <hechushiguitu666@xxxxxxxxx>
>
> 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@xxxxxxxxx>
> ---
> 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