* [PATCH v6 0/2] staging: rtl8723bs: Improve readability and clarity of sequence number wrapping
@ 2025-04-07 21:53 Abraham Samuel Adekunle
2025-04-07 21:53 ` [PATCH v6 1/2] staging: rtl8723bs: Add white spaces around binary operators Abraham Samuel Adekunle
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Abraham Samuel Adekunle @ 2025-04-07 21:53 UTC (permalink / raw)
To: outreachy, gregkh, julia.lawall
Cc: linux-staging, linux-kernel, david.laight.linux, andy,
dan.carpenter, Abraham Samuel Adekunle
Tha patchset adds spaces around binary operators and also
provides clarity on sequence number wrapping by using a modulo operation
% 4096u, in place of the bitwise AND(&) operation & 0xfff.
The patches are required to be applied in sequence.
Changes in v5:
- Converted the patch with the subject "Use % 4096 instead of & 0xfff"
patch to a patchset.
- Added a patch to add spaces around binary operator.
Changes in v4:
- Corrected patch to use '%' instead of '&'.
- To ensure this change does not affect the functional
behaviour, I compared the generated object files before and
after the change using the `cmp` which compares the two
object files byte by byte as shown below:
$ make drivers/staging/rtl8723bs/core/rtw_xmit.o
$ cmp rtw_xmit_before.o rtw_xmit_after.o
No differences were found in the output, confirming that the
change does not alter the compiled output.
Changes in v3:
- Added more description to the commit message.
- Removed blank line in the tag block.
- Added more patch recipients.
Changes in v2:
- Changed the commit message t a more descriptive message which
makes it clear why the patch does the change.
- changed the subject title to include `4096u` to show that an
unsigned module is used.
Changes in v1:
- Added more patch recipients.
Abraham Samuel Adekunle (2):
staging: rtl8723bs: Add white spaces around binary operators
staging: rtl8723bs: Use % 4096u instead of & 0xfff
drivers/staging/rtl8723bs/core/rtw_xmit.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v6 1/2] staging: rtl8723bs: Add white spaces around binary operators
2025-04-07 21:53 [PATCH v6 0/2] staging: rtl8723bs: Improve readability and clarity of sequence number wrapping Abraham Samuel Adekunle
@ 2025-04-07 21:53 ` Abraham Samuel Adekunle
2025-04-08 7:19 ` Andy Shevchenko
2025-04-07 21:53 ` [PATCH v6 2/2] staging: rtl8723bs: Use % 4096u instead of & 0xfff Abraham Samuel Adekunle
2025-04-08 7:20 ` [PATCH v6 0/2] staging: rtl8723bs: Improve readability and clarity of sequence number wrapping Andy Shevchenko
2 siblings, 1 reply; 14+ messages in thread
From: Abraham Samuel Adekunle @ 2025-04-07 21:53 UTC (permalink / raw)
To: outreachy, gregkh, julia.lawall
Cc: linux-staging, linux-kernel, david.laight.linux, andy,
dan.carpenter, Abraham Samuel Adekunle
The code contains no spaces around binary operators making it
hard to read. This also doesn't adhere to Linux kernel coding
style.
Add white spaces around the binary operators to increase readability
and endure adherence to Linux kernel coding styles.
Signed-off-by: Abraham Samuel Adekunle <abrahamadekunle50@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_xmit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 297c93d65315..c41de6fd897b 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -963,11 +963,11 @@ 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
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v6 2/2] staging: rtl8723bs: Use % 4096u instead of & 0xfff
2025-04-07 21:53 [PATCH v6 0/2] staging: rtl8723bs: Improve readability and clarity of sequence number wrapping Abraham Samuel Adekunle
2025-04-07 21:53 ` [PATCH v6 1/2] staging: rtl8723bs: Add white spaces around binary operators Abraham Samuel Adekunle
@ 2025-04-07 21:53 ` Abraham Samuel Adekunle
2025-04-08 7:20 ` [PATCH v6 0/2] staging: rtl8723bs: Improve readability and clarity of sequence number wrapping Andy Shevchenko
2 siblings, 0 replies; 14+ messages in thread
From: Abraham Samuel Adekunle @ 2025-04-07 21:53 UTC (permalink / raw)
To: outreachy, gregkh, julia.lawall
Cc: linux-staging, linux-kernel, david.laight.linux, andy,
dan.carpenter, Abraham Samuel Adekunle
The sequence number is constrained to a range of [0, 4095], which
is a total of 4096 values. The bitmask operation using `& 0xfff` is
used to perform this wrap-around. While this is functionally correct,
it obscures the intended semantic of a 4096-based wrap.
Using a modulo operation `% 4096u` makes the wrap-around logic
explicit and easier to understand. It clearly signals that the
sequence number cycles through a range of 4096 values.
It also makes the code robust against potential changes of the 4096
upper limit, especially when it becomes a non power of 2 value while
the AND(&) works solely for power of 2 values.
The use of `% 4096u` also guarantees that the modulo operation is
performed with unsigned arithmetic, preventing potential issues with
the signed types.
Suggested-by: Andy Shevchenko <andy@kernel.org>
Suggested-by: David Laight <david.laight.linux@gmail.com>
Signed-off-by: Abraham Samuel Adekunle <abrahamadekunle50@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_xmit.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index c41de6fd897b..5cfb6d1e9dae 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -943,7 +943,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
if (psta) {
psta->sta_xmitpriv.txseq_tid[pattrib->priority]++;
- psta->sta_xmitpriv.txseq_tid[pattrib->priority] &= 0xFFF;
+ psta->sta_xmitpriv.txseq_tid[pattrib->priority] %= 4096u;
pattrib->seqnum = psta->sta_xmitpriv.txseq_tid[pattrib->priority];
SetSeqNum(hdr, pattrib->seqnum);
@@ -963,11 +963,11 @@ 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) % 4096u;
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) % 4096u;
pattrib->ampdu_en = true;/* AGG EN */
}
}
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v6 1/2] staging: rtl8723bs: Add white spaces around binary operators
2025-04-07 21:53 ` [PATCH v6 1/2] staging: rtl8723bs: Add white spaces around binary operators Abraham Samuel Adekunle
@ 2025-04-08 7:19 ` Andy Shevchenko
2025-04-08 9:22 ` Samuel Abraham
0 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2025-04-08 7:19 UTC (permalink / raw)
To: Abraham Samuel Adekunle
Cc: outreachy, gregkh, julia.lawall, linux-staging, linux-kernel,
david.laight.linux, andy, dan.carpenter
On Tue, Apr 8, 2025 at 12:54 AM Abraham Samuel Adekunle
<abrahamadekunle50@gmail.com> wrote:
>
> The code contains no spaces around binary operators making it
> hard to read. This also doesn't adhere to Linux kernel coding
> style.
>
> Add white spaces around the binary operators to increase readability
> and endure adherence to Linux kernel coding styles.
...
> - psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq+1)&0xfff;
> + psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq + 1) & 0xfff;
> - psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum+1)&0xfff;
> + psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum + 1) & 0xfff;
You mentioned Linux coding style, which also requires lines not to be
so long. These lines are. That's why a few versions ago I suggested
you to change these to be two lines each. I don't know how many times
to repeat this (it's third one).
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v6 0/2] staging: rtl8723bs: Improve readability and clarity of sequence number wrapping
2025-04-07 21:53 [PATCH v6 0/2] staging: rtl8723bs: Improve readability and clarity of sequence number wrapping Abraham Samuel Adekunle
2025-04-07 21:53 ` [PATCH v6 1/2] staging: rtl8723bs: Add white spaces around binary operators Abraham Samuel Adekunle
2025-04-07 21:53 ` [PATCH v6 2/2] staging: rtl8723bs: Use % 4096u instead of & 0xfff Abraham Samuel Adekunle
@ 2025-04-08 7:20 ` Andy Shevchenko
2025-04-08 9:28 ` Samuel Abraham
2 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2025-04-08 7:20 UTC (permalink / raw)
To: Abraham Samuel Adekunle
Cc: outreachy, gregkh, julia.lawall, linux-staging, linux-kernel,
david.laight.linux, andy, dan.carpenter
On Tue, Apr 8, 2025 at 12:54 AM Abraham Samuel Adekunle
<abrahamadekunle50@gmail.com> wrote:
>
> Tha patchset adds spaces around binary operators and also
> provides clarity on sequence number wrapping by using a modulo operation
> % 4096u, in place of the bitwise AND(&) operation & 0xfff.
> The patches are required to be applied in sequence.
...
> Changes in v5:
This is v6. Are there any changes in comparison to v5?
> - Converted the patch with the subject "Use % 4096 instead of & 0xfff"
> patch to a patchset.
> - Added a patch to add spaces around binary operator.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v6 1/2] staging: rtl8723bs: Add white spaces around binary operators
2025-04-08 7:19 ` Andy Shevchenko
@ 2025-04-08 9:22 ` Samuel Abraham
2025-04-08 9:35 ` Andy Shevchenko
0 siblings, 1 reply; 14+ messages in thread
From: Samuel Abraham @ 2025-04-08 9:22 UTC (permalink / raw)
To: Andy Shevchenko
Cc: outreachy, gregkh, julia.lawall, linux-staging, linux-kernel,
david.laight.linux, andy, dan.carpenter
On Tue, Apr 8, 2025 at 8:20 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Tue, Apr 8, 2025 at 12:54 AM Abraham Samuel Adekunle
> <abrahamadekunle50@gmail.com> wrote:
> >
> > The code contains no spaces around binary operators making it
> > hard to read. This also doesn't adhere to Linux kernel coding
> > style.
> >
> > Add white spaces around the binary operators to increase readability
> > and endure adherence to Linux kernel coding styles.
>
> ...
>
> > - psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq+1)&0xfff;
> > + psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq + 1) & 0xfff;
>
> > - psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum+1)&0xfff;
> > + psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum + 1) & 0xfff;
>
> You mentioned Linux coding style, which also requires lines not to be
> so long. These lines are. That's why a few versions ago I suggested
> you to change these to be two lines each. I don't know how many times
> to repeat this (it's third one).
Okay, sorry
I will add a third patch for a line break before the patch for %
operations since each patch should handle a single thing.
Thanks.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v6 0/2] staging: rtl8723bs: Improve readability and clarity of sequence number wrapping
2025-04-08 7:20 ` [PATCH v6 0/2] staging: rtl8723bs: Improve readability and clarity of sequence number wrapping Andy Shevchenko
@ 2025-04-08 9:28 ` Samuel Abraham
2025-04-08 9:36 ` Andy Shevchenko
0 siblings, 1 reply; 14+ messages in thread
From: Samuel Abraham @ 2025-04-08 9:28 UTC (permalink / raw)
To: Andy Shevchenko
Cc: outreachy, gregkh, julia.lawall, linux-staging, linux-kernel,
david.laight.linux, andy, dan.carpenter
On Tue, Apr 8, 2025 at 8:21 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Tue, Apr 8, 2025 at 12:54 AM Abraham Samuel Adekunle
> <abrahamadekunle50@gmail.com> wrote:
> >
> > Tha patchset adds spaces around binary operators and also
> > provides clarity on sequence number wrapping by using a modulo operation
> > % 4096u, in place of the bitwise AND(&) operation & 0xfff.
> > The patches are required to be applied in sequence.
>
> ...
>
> > Changes in v5:
>
> This is v6. Are there any changes in comparison to v5?
I added a cover letter and named it v6 to show it's a continuation
from v5 and to show I added a
new patch for spaces.
I was not sure where would be best to add the change log so I put it
in the cover letter.
But as it concerns the patch for the % operation, there is no change
between v5 and v6
Thanks
Adekunle.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v6 1/2] staging: rtl8723bs: Add white spaces around binary operators
2025-04-08 9:22 ` Samuel Abraham
@ 2025-04-08 9:35 ` Andy Shevchenko
2025-04-08 10:15 ` Dan Carpenter
0 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2025-04-08 9:35 UTC (permalink / raw)
To: Samuel Abraham
Cc: outreachy, gregkh, julia.lawall, linux-staging, linux-kernel,
david.laight.linux, dan.carpenter
On Tue, Apr 08, 2025 at 10:22:44AM +0100, Samuel Abraham wrote:
> On Tue, Apr 8, 2025 at 8:20 AM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > On Tue, Apr 8, 2025 at 12:54 AM Abraham Samuel Adekunle
> > <abrahamadekunle50@gmail.com> wrote:
...
> > > - psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq+1)&0xfff;
> > > + psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq + 1) & 0xfff;
> >
> > > - psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum+1)&0xfff;
> > > + psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum + 1) & 0xfff;
> >
> > You mentioned Linux coding style, which also requires lines not to be
> > so long. These lines are. That's why a few versions ago I suggested
> > you to change these to be two lines each. I don't know how many times
> > to repeat this (it's third one).
>
> Okay, sorry
> I will add a third patch for a line break before the patch for %
> operations since each patch should handle a single thing.
I am not sure you need a third patch for that. It lies into category of space
and indentation fix.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v6 0/2] staging: rtl8723bs: Improve readability and clarity of sequence number wrapping
2025-04-08 9:28 ` Samuel Abraham
@ 2025-04-08 9:36 ` Andy Shevchenko
2025-04-08 11:46 ` Samuel Abraham
0 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2025-04-08 9:36 UTC (permalink / raw)
To: Samuel Abraham
Cc: outreachy, gregkh, julia.lawall, linux-staging, linux-kernel,
david.laight.linux, dan.carpenter
On Tue, Apr 08, 2025 at 10:28:36AM +0100, Samuel Abraham wrote:
> On Tue, Apr 8, 2025 at 8:21 AM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > On Tue, Apr 8, 2025 at 12:54 AM Abraham Samuel Adekunle
> > <abrahamadekunle50@gmail.com> wrote:
...
> > > Changes in v5:
> >
> > This is v6. Are there any changes in comparison to v5?
>
> I added a cover letter and named it v6 to show it's a continuation
> from v5 and to show I added a
> new patch for spaces.
> I was not sure where would be best to add the change log so I put it
> in the cover letter.
> But as it concerns the patch for the % operation, there is no change
> between v5 and v6
Then it should have
Changes in v6:
- none
which then questions the purpose of v6 :-)
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v6 1/2] staging: rtl8723bs: Add white spaces around binary operators
2025-04-08 9:35 ` Andy Shevchenko
@ 2025-04-08 10:15 ` Dan Carpenter
2025-04-08 11:51 ` Samuel Abraham
0 siblings, 1 reply; 14+ messages in thread
From: Dan Carpenter @ 2025-04-08 10:15 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Samuel Abraham, outreachy, gregkh, julia.lawall, linux-staging,
linux-kernel, david.laight.linux
On Tue, Apr 08, 2025 at 12:35:05PM +0300, Andy Shevchenko wrote:
> On Tue, Apr 08, 2025 at 10:22:44AM +0100, Samuel Abraham wrote:
> > On Tue, Apr 8, 2025 at 8:20 AM Andy Shevchenko
> > <andy.shevchenko@gmail.com> wrote:
> > > On Tue, Apr 8, 2025 at 12:54 AM Abraham Samuel Adekunle
> > > <abrahamadekunle50@gmail.com> wrote:
>
> ...
>
> > > > - psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq+1)&0xfff;
> > > > + psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq + 1) & 0xfff;
> > >
> > > > - psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum+1)&0xfff;
> > > > + psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum + 1) & 0xfff;
> > >
> > > You mentioned Linux coding style, which also requires lines not to be
> > > so long. These lines are. That's why a few versions ago I suggested
> > > you to change these to be two lines each. I don't know how many times
> > > to repeat this (it's third one).
> >
> > Okay, sorry
> > I will add a third patch for a line break before the patch for %
> > operations since each patch should handle a single thing.
>
> I am not sure you need a third patch for that. It lies into category of space
> and indentation fix.
>
Yeah. Let's not go crazy. Do the white space change as one patch. The
rules are there to make reviewing easier. Splitting it up into three
patches doesn't help anyone.
In staging we say, "Fix one type of checkpatch warning at a time."
That's because it's a simple rule to explain and it stops people from
sending us huge patches that fix every checkpatch warning. But this
patch is small and everything is related and it's easy to review.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v6 0/2] staging: rtl8723bs: Improve readability and clarity of sequence number wrapping
2025-04-08 9:36 ` Andy Shevchenko
@ 2025-04-08 11:46 ` Samuel Abraham
0 siblings, 0 replies; 14+ messages in thread
From: Samuel Abraham @ 2025-04-08 11:46 UTC (permalink / raw)
To: Andy Shevchenko
Cc: outreachy, gregkh, julia.lawall, linux-staging, linux-kernel,
david.laight.linux, dan.carpenter
On Tue, Apr 8, 2025 at 10:46 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Tue, Apr 08, 2025 at 10:28:36AM +0100, Samuel Abraham wrote:
> > On Tue, Apr 8, 2025 at 8:21 AM Andy Shevchenko
> > <andy.shevchenko@gmail.com> wrote:
> > > On Tue, Apr 8, 2025 at 12:54 AM Abraham Samuel Adekunle
> > > <abrahamadekunle50@gmail.com> wrote:
>
> ...
>
> > > > Changes in v5:
> > >
> > > This is v6. Are there any changes in comparison to v5?
> >
> > I added a cover letter and named it v6 to show it's a continuation
> > from v5 and to show I added a
> > new patch for spaces.
> > I was not sure where would be best to add the change log so I put it
> > in the cover letter.
> > But as it concerns the patch for the % operation, there is no change
> > between v5 and v6
>
> Then it should have
>
> Changes in v6:
> - none
>
> which then questions the purpose of v6 :-)
>
Okay, what should I version the next patchset I will be sending as, and also
how about the change log. Do I write it in the individual patches
rather than the cover letter?
I am a bit confused with that please kindly clarify.
Thanks
Adekunle
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v6 1/2] staging: rtl8723bs: Add white spaces around binary operators
2025-04-08 10:15 ` Dan Carpenter
@ 2025-04-08 11:51 ` Samuel Abraham
2025-04-08 12:38 ` Dan Carpenter
0 siblings, 1 reply; 14+ messages in thread
From: Samuel Abraham @ 2025-04-08 11:51 UTC (permalink / raw)
To: Dan Carpenter
Cc: Andy Shevchenko, outreachy, gregkh, julia.lawall, linux-staging,
linux-kernel, david.laight.linux
On Tue, Apr 8, 2025 at 11:36 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> On Tue, Apr 08, 2025 at 12:35:05PM +0300, Andy Shevchenko wrote:
> > On Tue, Apr 08, 2025 at 10:22:44AM +0100, Samuel Abraham wrote:
> > > On Tue, Apr 8, 2025 at 8:20 AM Andy Shevchenko
> > > <andy.shevchenko@gmail.com> wrote:
> > > > On Tue, Apr 8, 2025 at 12:54 AM Abraham Samuel Adekunle
> > > > <abrahamadekunle50@gmail.com> wrote:
> >
> > ...
> >
> > > > > - psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq+1)&0xfff;
> > > > > + psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq + 1) & 0xfff;
> > > >
> > > > > - psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum+1)&0xfff;
> > > > > + psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum + 1) & 0xfff;
> > > >
> > > > You mentioned Linux coding style, which also requires lines not to be
> > > > so long. These lines are. That's why a few versions ago I suggested
> > > > you to change these to be two lines each. I don't know how many times
> > > > to repeat this (it's third one).
> > >
> > > Okay, sorry
> > > I will add a third patch for a line break before the patch for %
> > > operations since each patch should handle a single thing.
> >
> > I am not sure you need a third patch for that. It lies into category of space
> > and indentation fix.
> >
>
> Yeah. Let's not go crazy. Do the white space change as one patch. The
> rules are there to make reviewing easier. Splitting it up into three
> patches doesn't help anyone.
Okay thank you Dan. I have collapsed the spaces and linebreaks into one patch
>
> In staging we say, "Fix one type of checkpatch warning at a time."
> That's because it's a simple rule to explain and it stops people from
> sending us huge patches that fix every checkpatch warning. But this
> patch is small and everything is related and it's easy to review.
>
Thank you very much for the clarity. I understand now.
I already asked Andy, but I would also like to seek your opinion on
how I should version
the next patch. I already made this current one v6. Do I send v7 with
changes in the cover letter,
or changes in the individual patches?
Or what is the best way please
Thanks
Adekunle.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v6 1/2] staging: rtl8723bs: Add white spaces around binary operators
2025-04-08 11:51 ` Samuel Abraham
@ 2025-04-08 12:38 ` Dan Carpenter
2025-04-08 12:53 ` Samuel Abraham
0 siblings, 1 reply; 14+ messages in thread
From: Dan Carpenter @ 2025-04-08 12:38 UTC (permalink / raw)
To: Samuel Abraham
Cc: Andy Shevchenko, outreachy, gregkh, julia.lawall, linux-staging,
linux-kernel, david.laight.linux
On Tue, Apr 08, 2025 at 12:51:03PM +0100, Samuel Abraham wrote:
> On Tue, Apr 8, 2025 at 11:36 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> >
> > On Tue, Apr 08, 2025 at 12:35:05PM +0300, Andy Shevchenko wrote:
> > > On Tue, Apr 08, 2025 at 10:22:44AM +0100, Samuel Abraham wrote:
> > > > On Tue, Apr 8, 2025 at 8:20 AM Andy Shevchenko
> > > > <andy.shevchenko@gmail.com> wrote:
> > > > > On Tue, Apr 8, 2025 at 12:54 AM Abraham Samuel Adekunle
> > > > > <abrahamadekunle50@gmail.com> wrote:
> > >
> > > ...
> > >
> > > > > > - psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq+1)&0xfff;
> > > > > > + psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq + 1) & 0xfff;
> > > > >
> > > > > > - psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum+1)&0xfff;
> > > > > > + psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum + 1) & 0xfff;
> > > > >
> > > > > You mentioned Linux coding style, which also requires lines not to be
> > > > > so long. These lines are. That's why a few versions ago I suggested
> > > > > you to change these to be two lines each. I don't know how many times
> > > > > to repeat this (it's third one).
> > > >
> > > > Okay, sorry
> > > > I will add a third patch for a line break before the patch for %
> > > > operations since each patch should handle a single thing.
> > >
> > > I am not sure you need a third patch for that. It lies into category of space
> > > and indentation fix.
> > >
> >
> > Yeah. Let's not go crazy. Do the white space change as one patch. The
> > rules are there to make reviewing easier. Splitting it up into three
> > patches doesn't help anyone.
>
> Okay thank you Dan. I have collapsed the spaces and linebreaks into one patch
>
> >
> > In staging we say, "Fix one type of checkpatch warning at a time."
> > That's because it's a simple rule to explain and it stops people from
> > sending us huge patches that fix every checkpatch warning. But this
> > patch is small and everything is related and it's easy to review.
> >
> Thank you very much for the clarity. I understand now.
>
> I already asked Andy, but I would also like to seek your opinion on
> how I should version
> the next patch. I already made this current one v6. Do I send v7 with
> changes in the cover letter,
Yes.
> or changes in the individual patches?
Both? Put yourself in Greg's shoes and do whatever is easiest for
Greg.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v6 1/2] staging: rtl8723bs: Add white spaces around binary operators
2025-04-08 12:38 ` Dan Carpenter
@ 2025-04-08 12:53 ` Samuel Abraham
0 siblings, 0 replies; 14+ messages in thread
From: Samuel Abraham @ 2025-04-08 12:53 UTC (permalink / raw)
To: Dan Carpenter
Cc: Andy Shevchenko, outreachy, gregkh, julia.lawall, linux-staging,
linux-kernel, david.laight.linux
On Tue, Apr 8, 2025 at 1:38 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> On Tue, Apr 08, 2025 at 12:51:03PM +0100, Samuel Abraham wrote:
> > On Tue, Apr 8, 2025 at 11:36 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> > >
> > > On Tue, Apr 08, 2025 at 12:35:05PM +0300, Andy Shevchenko wrote:
> > > > On Tue, Apr 08, 2025 at 10:22:44AM +0100, Samuel Abraham wrote:
> > > > > On Tue, Apr 8, 2025 at 8:20 AM Andy Shevchenko
> > > > > <andy.shevchenko@gmail.com> wrote:
> > > > > > On Tue, Apr 8, 2025 at 12:54 AM Abraham Samuel Adekunle
> > > > > > <abrahamadekunle50@gmail.com> wrote:
> > > >
> > > > ...
> > > >
> > > > > > > - psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq+1)&0xfff;
> > > > > > > + psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq + 1) & 0xfff;
> > > > > >
> > > > > > > - psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum+1)&0xfff;
> > > > > > > + psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum + 1) & 0xfff;
> > > > > >
> > > > > > You mentioned Linux coding style, which also requires lines not to be
> > > > > > so long. These lines are. That's why a few versions ago I suggested
> > > > > > you to change these to be two lines each. I don't know how many times
> > > > > > to repeat this (it's third one).
> > > > >
> > > > > Okay, sorry
> > > > > I will add a third patch for a line break before the patch for %
> > > > > operations since each patch should handle a single thing.
> > > >
> > > > I am not sure you need a third patch for that. It lies into category of space
> > > > and indentation fix.
> > > >
> > >
> > > Yeah. Let's not go crazy. Do the white space change as one patch. The
> > > rules are there to make reviewing easier. Splitting it up into three
> > > patches doesn't help anyone.
> >
> > Okay thank you Dan. I have collapsed the spaces and linebreaks into one patch
> >
> > >
> > > In staging we say, "Fix one type of checkpatch warning at a time."
> > > That's because it's a simple rule to explain and it stops people from
> > > sending us huge patches that fix every checkpatch warning. But this
> > > patch is small and everything is related and it's easy to review.
> > >
> > Thank you very much for the clarity. I understand now.
> >
> > I already asked Andy, but I would also like to seek your opinion on
> > how I should version
> > the next patch. I already made this current one v6. Do I send v7 with
> > changes in the cover letter,
>
> Yes.
>
> > or changes in the individual patches?
>
> Both? Put yourself in Greg's shoes and do whatever is easiest for
> Greg.
Thank you very much, Dan.
Adekunle.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-04-08 12:53 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07 21:53 [PATCH v6 0/2] staging: rtl8723bs: Improve readability and clarity of sequence number wrapping Abraham Samuel Adekunle
2025-04-07 21:53 ` [PATCH v6 1/2] staging: rtl8723bs: Add white spaces around binary operators Abraham Samuel Adekunle
2025-04-08 7:19 ` Andy Shevchenko
2025-04-08 9:22 ` Samuel Abraham
2025-04-08 9:35 ` Andy Shevchenko
2025-04-08 10:15 ` Dan Carpenter
2025-04-08 11:51 ` Samuel Abraham
2025-04-08 12:38 ` Dan Carpenter
2025-04-08 12:53 ` Samuel Abraham
2025-04-07 21:53 ` [PATCH v6 2/2] staging: rtl8723bs: Use % 4096u instead of & 0xfff Abraham Samuel Adekunle
2025-04-08 7:20 ` [PATCH v6 0/2] staging: rtl8723bs: Improve readability and clarity of sequence number wrapping Andy Shevchenko
2025-04-08 9:28 ` Samuel Abraham
2025-04-08 9:36 ` Andy Shevchenko
2025-04-08 11:46 ` Samuel Abraham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox