The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: fix line length checks in rtw_cmd.c
@ 2026-05-10  3:29 Noah Techoueyres
  2026-05-10 19:18 ` Nikolay Kulikov
  0 siblings, 1 reply; 2+ messages in thread
From: Noah Techoueyres @ 2026-05-10  3:29 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, Noah Techoueyres

Fix both block comments and assignment statements that exceed the
100-column limit to follow Linux guidelines for readability.

Signed-off-by: Noah Techoueyres <noahtechoueyres@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index c1185c25ed36..a401c856c727 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -1117,13 +1117,17 @@ static void collect_traffic_statistics(struct adapter *padapter)
 	pdvobjpriv->traffic_stat.rx_drop = padapter->recvpriv.rx_drop;
 
 	/*  Calculate throughput in last interval */
-	pdvobjpriv->traffic_stat.cur_tx_bytes = pdvobjpriv->traffic_stat.tx_bytes - pdvobjpriv->traffic_stat.last_tx_bytes;
-	pdvobjpriv->traffic_stat.cur_rx_bytes = pdvobjpriv->traffic_stat.rx_bytes - pdvobjpriv->traffic_stat.last_rx_bytes;
+	pdvobjpriv->traffic_stat.cur_tx_bytes =
+		pdvobjpriv->traffic_stat.tx_bytes - pdvobjpriv->traffic_stat.last_tx_bytes;
+	pdvobjpriv->traffic_stat.cur_rx_bytes =
+		pdvobjpriv->traffic_stat.rx_bytes - pdvobjpriv->traffic_stat.last_rx_bytes;
 	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);
 }
 
 bool traffic_status_watchdog(struct adapter *padapter, bool from_timer)
@@ -1743,7 +1747,11 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf)
 	pdrvextra_cmd = (struct drvextra_cmd_parm *)pbuf;
 
 	switch (pdrvextra_cmd->ec_id) {
-	case DYNAMIC_CHK_WK_CID:/* only  primary padapter go to this cmd, but execute dynamic_chk_wk_hdl() for two interfaces */
+	case DYNAMIC_CHK_WK_CID:
+		/*
+		 * only primary padapter go to this cmd, but execute
+		 * dynamic_chk_wk_hdl() for two interfaces
+		 */
 		dynamic_chk_wk_hdl(padapter);
 		break;
 	case POWER_SAVING_CTRL_WK_CID:
@@ -1881,7 +1889,10 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
 		_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
 
 		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) */
+		/*
+		 * we will set _FW_LINKED when there is one more sta
+		 * to join us (rtw_stassoc_event_callback)
+		 */
 	}
 
 createbss_cmd_fail:
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: rtl8723bs: fix line length checks in rtw_cmd.c
  2026-05-10  3:29 [PATCH] staging: rtl8723bs: fix line length checks in rtw_cmd.c Noah Techoueyres
@ 2026-05-10 19:18 ` Nikolay Kulikov
  0 siblings, 0 replies; 2+ messages in thread
From: Nikolay Kulikov @ 2026-05-10 19:18 UTC (permalink / raw)
  To: Noah Techoueyres; +Cc: gregkh, linux-staging, linux-kernel

On Sat, May 09, 2026 at 11:29:36PM -0400, Noah Techoueyres wrote:
> Fix both block comments and assignment statements that exceed the
> 100-column limit to follow Linux guidelines for readability.
> 
> Signed-off-by: Noah Techoueyres <noahtechoueyres@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_cmd.c | 23 +++++++++++++++++------
>  1 file changed, 17 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
> index c1185c25ed36..a401c856c727 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
> @@ -1117,13 +1117,17 @@ static void collect_traffic_statistics(struct adapter *padapter)
>  	pdvobjpriv->traffic_stat.rx_drop = padapter->recvpriv.rx_drop;
>  
>  	/*  Calculate throughput in last interval */
> -	pdvobjpriv->traffic_stat.cur_tx_bytes = pdvobjpriv->traffic_stat.tx_bytes - pdvobjpriv->traffic_stat.last_tx_bytes;
> -	pdvobjpriv->traffic_stat.cur_rx_bytes = pdvobjpriv->traffic_stat.rx_bytes - pdvobjpriv->traffic_stat.last_rx_bytes;
> +	pdvobjpriv->traffic_stat.cur_tx_bytes =
> +		pdvobjpriv->traffic_stat.tx_bytes - pdvobjpriv->traffic_stat.last_tx_bytes;
> +	pdvobjpriv->traffic_stat.cur_rx_bytes =
> +		pdvobjpriv->traffic_stat.rx_bytes - pdvobjpriv->traffic_stat.last_rx_bytes;
>  	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);
>  }

What about adding an intermediate pointer to traffic_stat?
This will not only reduce the length of the lines, but will also make
the code easier to read.


Thanks,
Nikolay

>  
>  bool traffic_status_watchdog(struct adapter *padapter, bool from_timer)
> @@ -1743,7 +1747,11 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf)
>  	pdrvextra_cmd = (struct drvextra_cmd_parm *)pbuf;
>  
>  	switch (pdrvextra_cmd->ec_id) {
> -	case DYNAMIC_CHK_WK_CID:/* only  primary padapter go to this cmd, but execute dynamic_chk_wk_hdl() for two interfaces */
> +	case DYNAMIC_CHK_WK_CID:
> +		/*
> +		 * only primary padapter go to this cmd, but execute
> +		 * dynamic_chk_wk_hdl() for two interfaces
> +		 */
>  		dynamic_chk_wk_hdl(padapter);
>  		break;
>  	case POWER_SAVING_CTRL_WK_CID:
> @@ -1881,7 +1889,10 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
>  		_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
>  
>  		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) */
> +		/*
> +		 * we will set _FW_LINKED when there is one more sta
> +		 * to join us (rtw_stassoc_event_callback)
> +		 */
>  	}
>  
>  createbss_cmd_fail:
> -- 
> 2.53.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-10 19:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-10  3:29 [PATCH] staging: rtl8723bs: fix line length checks in rtw_cmd.c Noah Techoueyres
2026-05-10 19:18 ` Nikolay Kulikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox