Re: [PATCH v2] staging: rtl8723bs: split chained assignments in _rtw_open_pktfile()

From: Greg KH

Date: Tue Sep 01 2026 - 10:00:39 EST


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@xxxxxxxxx>
> ---
> 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