All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Keith Teeple <keithrteeple@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org, s9430399@naver.com,
	andriy.shevchenko@intel.com
Subject: Re: [PATCH] staging: rtl8723bs: split chained assignment in xmit_linux.c
Date: Thu, 26 Feb 2026 10:20:26 +0300	[thread overview]
Message-ID: <aZ_0OratIkUBNHmy@stanley.mountain> (raw)
In-Reply-To: <20260226001019.1100684-1-keithrteeple@gmail.com>

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
> 

  parent reply	other threads:[~2026-02-26  7:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-26  0:10 [PATCH] staging: rtl8723bs: split chained assignment in xmit_linux.c Keith Teeple
2026-02-26  1:41 ` Greg KH
2026-02-26  7:20 ` Dan Carpenter [this message]
2026-02-26  7:59   ` Andy Shevchenko

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=aZ_0OratIkUBNHmy@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=keithrteeple@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=s9430399@naver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.