Linux kernel staging patches
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Sajal Gupta <sajal2005gupta@gmail.com>
Cc: gregkh@linuxfoundation.org, dennylin0707@gmail.com,
	khushalchitturi@gmail.com, nikolayof23@gmail.com,
	khomenkov@mailbox.org, s9430939@naver.com,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: split multiple assignments in rtw_xmit.c
Date: Mon, 18 May 2026 08:21:11 +0300	[thread overview]
Message-ID: <agqhx2yQdbRe3zZp@stanley.mountain> (raw)
In-Reply-To: <20260517092141.9518-1-sajal2005gupta@gmail.com>

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@gmail.com>
> ---
>  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


  reply	other threads:[~2026-05-18  5:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-17  9:21 [PATCH] staging: rtl8723bs: split multiple assignments in rtw_xmit.c Sajal Gupta
2026-05-18  5:21 ` Dan Carpenter [this message]
2026-05-18  6:07   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=agqhx2yQdbRe3zZp@stanley.mountain \
    --to=error27@gmail.com \
    --cc=dennylin0707@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=khomenkov@mailbox.org \
    --cc=khushalchitturi@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=nikolayof23@gmail.com \
    --cc=s9430939@naver.com \
    --cc=sajal2005gupta@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox