mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Godana Emiru <godanaemiru@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Godana Emiru <godanaemiru@gmail.com>
Subject: [PATCH v2] staging: rtl8723bs: split chained assignments in _rtw_open_pktfile()
Date: Tue,  1 Sep 2026 14:04:37 +0300	[thread overview]
Message-ID: <20260901110437.37588-1-godanaemiru@gmail.com> (raw)
In-Reply-To: <20260827062137.12937-2-godanaemiru@gmail.com>

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


  parent reply	other threads:[~2026-09-01 11:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27  6:21 [PATCH 1/3] staging: rtl8723bs: remove a stray blank line in xmit_linux.c Godana Emiru
2026-08-27  6:21 ` [PATCH 2/3] staging: rtl8723bs: split chained assignments in _rtw_open_pktfile() Godana Emiru
2026-09-01 10:13   ` Greg KH
2026-09-01 11:04   ` Godana Emiru [this message]
2026-09-01 13:53     ` [PATCH v2] " Greg KH
2026-08-27  6:21 ` [PATCH 3/3] staging: rtl8723bs: wrap long prototype of rtw_os_xmit_resource_free() Godana Emiru

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=20260901110437.37588-1-godanaemiru@gmail.com \
    --to=godanaemiru@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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

all inboxes | Powered by JetHome®