[PATCH v7 1/2] staging: rtl8723bs: Add spaces and line breaks to improve readability

Abraham Samuel Adekunle posted 2 patches 10 months, 1 week ago
There is a newer version of this series
[PATCH v7 1/2] staging: rtl8723bs: Add spaces and line breaks to improve readability
Posted by Abraham Samuel Adekunle 10 months, 1 week ago
The code contains no spaces around binary operators with long lines
which reduces readability thereby not adhering to Linux kernel coding
style.

Add white spaces around the binary operators and use line breaks to
increase readability and ensure adherence to Linux kernel coding
styles.

Suggested-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Abraham Samuel Adekunle <abrahamadekunle50@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_xmit.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 297c93d65315..9ba3bebfc8bd 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -963,11 +963,13 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
 					if (SN_LESS(pattrib->seqnum, tx_seq)) {
 						pattrib->ampdu_en = false;/* AGG BK */
 					} else if (SN_EQUAL(pattrib->seqnum, tx_seq)) {
-						psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq+1)&0xfff;
+						psta->BA_starting_seqctrl[pattrib->priority & 0x0f] =
+							(tx_seq + 1) & 0xfff;
 
 						pattrib->ampdu_en = true;/* AGG EN */
 					} else {
-						psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum+1)&0xfff;
+						psta->BA_starting_seqctrl[pattrib->priority & 0x0f] =
+							(pattrib->seqnum + 1) & 0xfff;
 						pattrib->ampdu_en = true;/* AGG EN */
 					}
 				}
-- 
2.34.1
Re: [PATCH v7 1/2] staging: rtl8723bs: Add spaces and line breaks to improve readability
Posted by Andy Shevchenko 10 months, 1 week ago
On Tue, Apr 08, 2025 at 01:31:41PM +0000, Abraham Samuel Adekunle wrote:
> The code contains no spaces around binary operators with long lines
> which reduces readability thereby not adhering to Linux kernel coding
> style.
> 
> Add white spaces around the binary operators and use line breaks to
> increase readability and ensure adherence to Linux kernel coding
> styles.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
See one nit-pick below.

...

>  					} else if (SN_EQUAL(pattrib->seqnum, tx_seq)) {
> -						psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq+1)&0xfff;
> +						psta->BA_starting_seqctrl[pattrib->priority & 0x0f] =
> +							(tx_seq + 1) & 0xfff;
>  
>  						pattrib->ampdu_en = true;/* AGG EN */
>  					} else {
> -						psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum+1)&0xfff;
> +						psta->BA_starting_seqctrl[pattrib->priority & 0x0f] =
> +							(pattrib->seqnum + 1) & 0xfff;

Probably it deserves a blank line here as in the above case.
But it was in the original like this, so at least it not worse
than that.

>  						pattrib->ampdu_en = true;/* AGG EN */
>  					}

-- 
With Best Regards,
Andy Shevchenko