Re: [PATCH] staging: rtl8723bs: split multiple assignments in rtw_xmit.c
From: Dan Carpenter
Date: Mon May 18 2026 - 01:24:11 EST
On Sun, May 17, 2026 at 02:51:20PM +0530, Sajal Gupta wrote:
> Split multiple assignments into separate statements to comply
> with kernel coding style. Fixes the checkpatch warnings:
> "multiple assignments should be avoided"
>
> Signed-off-by: Sajal Gupta <sajal2005gupta@xxxxxxxxx>
> ---
> drivers/staging/rtl8723bs/core/rtw_xmit.c | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> index 458e471535ad..e30c99eeee89 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> @@ -185,7 +185,8 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
> pxmitbuf->phead = pxmitbuf->pbuf;
> pxmitbuf->pend = pxmitbuf->pbuf + MAX_XMITBUF_SZ;
> pxmitbuf->len = 0;
> - pxmitbuf->pdata = pxmitbuf->ptail = pxmitbuf->phead;
> + pxmitbuf->ptail = pxmitbuf->phead;
> + pxmitbuf->pdata = pxmitbuf->ptail;
I find this harder to read.
To be honest, I don't really have a problem with the original code.
Another option might be to say:
pxmitbuf->ptail = pxmitbuf->phead;
pxmitbuf->pdata = pxmitbuf->phead;
But honestly, I'm not sure it's a very big improvement. We'd probably
allow it to just stop people from sending more patches and having
another discussion about this.
regards,
dan carpenter