Skip to contentSkip to conversation

staging: rtl8723bs: Split multiple assignments in _rtw_open_pktfile

PATCH In review Amin Madani 2 participants 2 messages Jul 16 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: rtl8723bs: Split multiple assignments in _rtw_open_pktfile

In _rtw_open_pktfile(), multiple variables are assigned on the same line. According to the Linux kernel coding style, multiple assignments on a single line should be avoided. Split them into separate lines to improve readability.

---
v2: Assign pktptr values directly to variables instead of chaining them,
as suggested by Dan Carpenter.
(https://lore.kernel.org/all/[email protected]/)

 drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/os_dep/xmit_linux.c +4 -2
index 4260ed5f4..ea60320c0 100644
@@ -15,8 +15,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;
 }
Signature · 1 line
2.53.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 11 lines · Amin Madani

In _rtw_open_pktfile(), multiple variables are assigned on the same line. According to the Linux kernel coding style, multiple assignments on a single line should be avoided. Split them into separate lines to improve readability.

---
v2: Assign pktptr values directly to variables instead of chaining them,
as suggested by Dan Carpenter.
(https://lore.kernel.org/all/[email protected]/)

Thanks!

regards,
dan carpenter