* [PATCH 1/3] staging: rtl8723bs: remove a stray blank line in xmit_linux.c
@ 2026-08-27 6:21 Godana Emiru
2026-08-27 6:21 ` [PATCH 2/3] staging: rtl8723bs: split chained assignments in _rtw_open_pktfile() Godana Emiru
2026-08-27 6:21 ` [PATCH 3/3] staging: rtl8723bs: wrap long prototype of rtw_os_xmit_resource_free() Godana Emiru
0 siblings, 2 replies; 6+ messages in thread
From: Godana Emiru @ 2026-08-27 6:21 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Godana Emiru
There are two consecutive blank lines after the #include. Remove the
extra one.
No functional change.
Signed-off-by: Godana Emiru <godanaemiru@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
index 4260ed5f4..7a9d2fabc 100644
--- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
@@ -6,7 +6,6 @@
******************************************************************************/
#include <drv_types.h>
-
uint rtw_remainder_len(struct pkt_file *pfile)
{
return (pfile->buf_len - ((SIZE_PTR)(pfile->cur_addr) - (SIZE_PTR)(pfile->buf_start)));
--
2.53.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/3] staging: rtl8723bs: split chained assignments in _rtw_open_pktfile()
2026-08-27 6:21 [PATCH 1/3] staging: rtl8723bs: remove a stray blank line in xmit_linux.c Godana Emiru
@ 2026-08-27 6:21 ` Godana Emiru
2026-09-01 10:13 ` Greg KH
2026-09-01 11:04 ` [PATCH v2] " Godana Emiru
2026-08-27 6:21 ` [PATCH 3/3] staging: rtl8723bs: wrap long prototype of rtw_os_xmit_resource_free() Godana Emiru
1 sibling, 2 replies; 6+ messages in thread
From: Godana Emiru @ 2026-08-27 6:21 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Godana Emiru
Split the two chained assignments into separate statements, one
variable per line, preserving the original assignment order.
No functional change.
Signed-off-by: Godana Emiru <godanaemiru@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
index 7a9d2fabc..c5f90a906 100644
--- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
@@ -14,8 +14,10 @@ uint rtw_remainder_len(struct pkt_file *pfile)
void _rtw_open_pktfile(struct sk_buff *pktptr, struct pkt_file *pfile)
{
pfile->pkt = pktptr;
- pfile->cur_addr = pfile->buf_start = pktptr->data;
- pfile->pkt_len = pfile->buf_len = pktptr->len;
+ pfile->buf_start = pktptr->data;
+ pfile->cur_addr = pfile->buf_start;
+ pfile->buf_len = pktptr->len;
+ pfile->pkt_len = pfile->buf_len;
pfile->cur_buffer = pfile->buf_start;
}
--
2.53.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/3] staging: rtl8723bs: wrap long prototype of rtw_os_xmit_resource_free()
2026-08-27 6:21 [PATCH 1/3] staging: rtl8723bs: remove a stray blank line in xmit_linux.c Godana Emiru
2026-08-27 6:21 ` [PATCH 2/3] staging: rtl8723bs: split chained assignments in _rtw_open_pktfile() Godana Emiru
@ 2026-08-27 6:21 ` Godana Emiru
1 sibling, 0 replies; 6+ messages in thread
From: Godana Emiru @ 2026-08-27 6:21 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Godana Emiru
The function prototype exceeds the column limit. Wrap it onto two
lines, aligned to the open parenthesis.
No functional change.
Signed-off-by: Godana Emiru <godanaemiru@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
index c5f90a906..4a3c3df5a 100644
--- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
@@ -49,7 +49,8 @@ signed int rtw_endofpktfile(struct pkt_file *pfile)
return false;
}
-void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf, u32 free_sz, u8 flag)
+void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf,
+ u32 free_sz, u8 flag)
{
if (free_sz > 0)
kfree(pxmitbuf->pallocated_buf);
--
2.53.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] staging: rtl8723bs: split chained assignments in _rtw_open_pktfile()
2026-08-27 6:21 ` [PATCH 2/3] staging: rtl8723bs: split chained assignments in _rtw_open_pktfile() Godana Emiru
@ 2026-09-01 10:13 ` Greg KH
2026-09-01 11:04 ` [PATCH v2] " Godana Emiru
1 sibling, 0 replies; 6+ messages in thread
From: Greg KH @ 2026-09-01 10:13 UTC (permalink / raw)
To: Godana Emiru; +Cc: linux-staging, linux-kernel
On Thu, Aug 27, 2026 at 09:21:36AM +0300, Godana Emiru wrote:
> Split the two chained assignments into separate statements, one
> variable per line, preserving the original assignment order.
>
> No functional change.
>
> Signed-off-by: Godana Emiru <godanaemiru@gmail.com>
> ---
> drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
> index 7a9d2fabc..c5f90a906 100644
> --- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
> +++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
> @@ -14,8 +14,10 @@ uint rtw_remainder_len(struct pkt_file *pfile)
> void _rtw_open_pktfile(struct sk_buff *pktptr, struct pkt_file *pfile)
> {
> pfile->pkt = pktptr;
> - pfile->cur_addr = pfile->buf_start = pktptr->data;
> - pfile->pkt_len = pfile->buf_len = pktptr->len;
> + pfile->buf_start = pktptr->data;
> + pfile->cur_addr = pfile->buf_start;
> + pfile->buf_len = pktptr->len;
> + pfile->pkt_len = pfile->buf_len;
This is harder to read now, right? Please see the archives for a
suggestion as to how to make this more understandable.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] staging: rtl8723bs: split chained assignments in _rtw_open_pktfile()
2026-08-27 6:21 ` [PATCH 2/3] staging: rtl8723bs: split chained assignments in _rtw_open_pktfile() Godana Emiru
2026-09-01 10:13 ` Greg KH
@ 2026-09-01 11:04 ` Godana Emiru
2026-09-01 13:53 ` Greg KH
1 sibling, 1 reply; 6+ messages in thread
From: Godana Emiru @ 2026-09-01 11:04 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Godana Emiru
Fix a checkpatch CHECK ("multiple assignments should be avoided") by
splitting the two chained assignments into separate statements.
Assign cur_addr and buf_start directly from pktptr->data, and pkt_len
and buf_len directly from pktptr->len, rather than chaining one field
through the other. This avoids making the reader trace a dependency
between the two assignments to see that they end up with the same
value.
No functional change.
Signed-off-by: Godana Emiru <godanaemiru@gmail.com>
---
v2: Assign each field directly from its source value (pktptr->data /
pktptr->len) instead of chaining one field's assignment through
the other, per Greg's review comment that the v1 split was harder
to read than the original.
drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
index 7a9d2fabc..9f0d84e2e 100644
--- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
@@ -14,8 +14,10 @@ uint rtw_remainder_len(struct pkt_file *pfile)
void _rtw_open_pktfile(struct sk_buff *pktptr, struct pkt_file *pfile)
{
pfile->pkt = pktptr;
- pfile->cur_addr = pfile->buf_start = pktptr->data;
- pfile->pkt_len = pfile->buf_len = pktptr->len;
+ pfile->buf_start = pktptr->data;
+ pfile->cur_addr = pktptr->data;
+ pfile->buf_len = pktptr->len;
+ pfile->pkt_len = pktptr->len;
pfile->cur_buffer = pfile->buf_start;
}
--
2.53.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] staging: rtl8723bs: split chained assignments in _rtw_open_pktfile()
2026-09-01 11:04 ` [PATCH v2] " Godana Emiru
@ 2026-09-01 13:53 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2026-09-01 13:53 UTC (permalink / raw)
To: Godana Emiru; +Cc: linux-staging, linux-kernel
On Tue, Sep 01, 2026 at 02:04:37PM +0300, Godana Emiru wrote:
> Fix a checkpatch CHECK ("multiple assignments should be avoided") by
> splitting the two chained assignments into separate statements.
>
> Assign cur_addr and buf_start directly from pktptr->data, and pkt_len
> and buf_len directly from pktptr->len, rather than chaining one field
> through the other. This avoids making the reader trace a dependency
> between the two assignments to see that they end up with the same
> value.
>
> No functional change.
>
> Signed-off-by: Godana Emiru <godanaemiru@gmail.com>
> ---
> v2: Assign each field directly from its source value (pktptr->data /
> pktptr->len) instead of chaining one field's assignment through
> the other, per Greg's review comment that the v1 split was harder
> to read than the original.
>
> drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
> index 7a9d2fabc..9f0d84e2e 100644
> --- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
> +++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
> @@ -14,8 +14,10 @@ uint rtw_remainder_len(struct pkt_file *pfile)
> void _rtw_open_pktfile(struct sk_buff *pktptr, struct pkt_file *pfile)
> {
> pfile->pkt = pktptr;
> - pfile->cur_addr = pfile->buf_start = pktptr->data;
> - pfile->pkt_len = pfile->buf_len = pktptr->len;
> + pfile->buf_start = pktptr->data;
> + pfile->cur_addr = pktptr->data;
> + pfile->buf_len = pktptr->len;
> + pfile->pkt_len = pktptr->len;
>
> pfile->cur_buffer = pfile->buf_start;
> }
> --
> 2.53.0
>
This was already done in the 7.3-rc1 kernel release in commit
cb08dcd0a896 ("staging: rtl8723bs: Split multiple assignments in
_rtw_open_pktfile"), sorry.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-09-01 13:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-27 6:21 [PATCH 1/3] staging: rtl8723bs: remove a stray blank line in xmit_linux.c Godana Emiru
2026-08-27 6:21 ` [PATCH 2/3] staging: rtl8723bs: split chained assignments in _rtw_open_pktfile() Godana Emiru
2026-09-01 10:13 ` Greg KH
2026-09-01 11:04 ` [PATCH v2] " Godana Emiru
2026-09-01 13:53 ` Greg KH
2026-08-27 6:21 ` [PATCH 3/3] staging: rtl8723bs: wrap long prototype of rtw_os_xmit_resource_free() Godana Emiru
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®