Re: [PATCH] staging: rtl8723bs: split chained assignment in xmit_linux.c
From: Dan Carpenter
Date: Thu Feb 26 2026 - 02:23:32 EST
On Wed, Feb 25, 2026 at 07:10:19PM -0500, Keith Teeple wrote:
> @@ -15,9 +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;
Please don't do it like this. Do it like this:
pfile->buf_start = pktptr->data;
pfile->cur_addr = pktptr->data;
Otherwise we have made the new version harder to read than the original
code.
regards,
dan carpenter
> + pfile->buf_len = pktptr->len;
> + pfile->pkt_len = pfile->buf_len;
> pfile->cur_buffer = pfile->buf_start;
> }
>
> --
> 2.53.0
>