* [PATCH] staging: rtl8723bs: split multiple assignments in rtw_xmit.c
@ 2026-05-17 9:21 Sajal Gupta
2026-05-18 5:21 ` Dan Carpenter
0 siblings, 1 reply; 3+ messages in thread
From: Sajal Gupta @ 2026-05-17 9:21 UTC (permalink / raw)
To: gregkh
Cc: error27, dennylin0707, khushalchitturi, nikolayof23, khomenkov,
s9430939, linux-staging, linux-kernel, Sajal Gupta
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;
pxmitbuf->flags = XMIT_VO_QUEUE;
@@ -260,7 +261,8 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
pxmitbuf->phead = pxmitbuf->pbuf;
pxmitbuf->pend = pxmitbuf->pbuf + MAX_XMIT_EXTBUF_SZ;
pxmitbuf->len = 0;
- pxmitbuf->pdata = pxmitbuf->ptail = pxmitbuf->phead;
+ pxmitbuf->ptail = pxmitbuf->phead;
+ pxmitbuf->pdata = pxmitbuf->ptail;
list_add_tail(&pxmitbuf->list,
&pxmitpriv->free_xmit_extbuf_queue.queue);
@@ -290,7 +292,8 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
pxmitbuf->phead = pxmitbuf->pbuf;
pxmitbuf->pend = pxmitbuf->pbuf + MAX_CMDBUF_SZ;
pxmitbuf->len = 0;
- pxmitbuf->pdata = pxmitbuf->ptail = pxmitbuf->phead;
+ pxmitbuf->ptail = pxmitbuf->phead;
+ pxmitbuf->pdata = pxmitbuf->ptail;
pxmitbuf->alloc_sz = MAX_CMDBUF_SZ + XMITBUF_ALIGN_SZ;
}
}
@@ -1231,7 +1234,8 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s
u8 MME[_MME_IE_LENGTH_];
u32 ori_len;
- mem_start = pframe = (u8 *)(pxmitframe->buf_addr) + TXDESC_OFFSET;
+ pframe = (u8 *)(pxmitframe->buf_addr) + TXDESC_OFFSET;
+ mem_start = pframe;
pwlanhdr = (struct ieee80211_hdr *)pframe;
ori_len = BIP_AAD_SIZE + pattrib->pktlen;
@@ -1483,7 +1487,8 @@ static struct xmit_buf *__rtw_alloc_cmd_xmitbuf(struct xmit_priv *pxmitpriv,
pxmitbuf->priv_data = NULL;
pxmitbuf->len = 0;
- pxmitbuf->pdata = pxmitbuf->ptail = pxmitbuf->phead;
+ pxmitbuf->ptail = pxmitbuf->phead;
+ pxmitbuf->pdata = pxmitbuf->ptail;
pxmitbuf->agg_num = 0;
pxmitbuf->pg_num = 0;
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: rtl8723bs: split multiple assignments in rtw_xmit.c
2026-05-17 9:21 [PATCH] staging: rtl8723bs: split multiple assignments in rtw_xmit.c Sajal Gupta
@ 2026-05-18 5:21 ` Dan Carpenter
2026-05-18 6:07 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2026-05-18 5:21 UTC (permalink / raw)
To: Sajal Gupta
Cc: gregkh, dennylin0707, khushalchitturi, nikolayof23, khomenkov,
s9430939, linux-staging, linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: rtl8723bs: split multiple assignments in rtw_xmit.c
2026-05-18 5:21 ` Dan Carpenter
@ 2026-05-18 6:07 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2026-05-18 6:07 UTC (permalink / raw)
To: Dan Carpenter
Cc: Sajal Gupta, dennylin0707, khushalchitturi, nikolayof23,
khomenkov, s9430939, linux-staging, linux-kernel
On Mon, May 18, 2026 at 08:21:11AM +0300, Dan Carpenter wrote:
> 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.
I agree, let's leave it as-is.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-18 6:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-17 9:21 [PATCH] staging: rtl8723bs: split multiple assignments in rtw_xmit.c Sajal Gupta
2026-05-18 5:21 ` Dan Carpenter
2026-05-18 6:07 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox