drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Combine declaration and assignment of pframe into a single line.
No functional change.
v2: adjust formatting based on review feedback.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
index a1f2cbf2cf55..c79df13b67a8 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
@@ -239,8 +239,8 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
/* pxmitbuf->priv_data will be NULL, and will crash here */
if (pxmitbuf->len > 0 &&
pxmitbuf->priv_data) {
- struct xmit_frame *pframe;
- pframe = (struct xmit_frame *)pxmitbuf->priv_data;
+ struct xmit_frame *pframe = pxmitbuf->priv_data;
+
pframe->agg_num = k;
pxmitbuf->agg_num = k;
rtl8723b_update_txdesc(pframe, pframe->buf_addr);
--
2.34.1
On Fri, Apr 03, 2026 at 05:54:27PM +0000, Hungyu Lin wrote:
> Combine declaration and assignment of pframe into a single line.
But why?
>
> No functional change.
>
> v2: adjust formatting based on review feedback.
This goes below the --- line.
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
> drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> index a1f2cbf2cf55..c79df13b67a8 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> @@ -239,8 +239,8 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
> /* pxmitbuf->priv_data will be NULL, and will crash here */
> if (pxmitbuf->len > 0 &&
> pxmitbuf->priv_data) {
> - struct xmit_frame *pframe;
> - pframe = (struct xmit_frame *)pxmitbuf->priv_data;
> + struct xmit_frame *pframe = pxmitbuf->priv_data;
> +
If the cast is not needed, that can be dropped, but really, I don't see
what is wrong with the original code, do you?
What tool is asking you to make this change?
thanks,
greg k-h
On Fri, Apr 03, 2026 at 11:00:00AM +0000, Greg Kroah-Hartman wrote:
> But why?
> ...
> I don't see what is wrong with the original code, do you?
You are right, there is no real improvement over the original code.
I will drop this patch.
Thanks,
Hungyu
On Fri, Apr 3, 2026 at 11:00 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Fri, Apr 03, 2026 at 05:54:27PM +0000, Hungyu Lin wrote:
> > Combine declaration and assignment of pframe into a single line.
>
> But why?
>
> >
> > No functional change.
> >
> > v2: adjust formatting based on review feedback.
>
> This goes below the --- line.
>
> > Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> > ---
> > drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> > index a1f2cbf2cf55..c79df13b67a8 100644
> > --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> > +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> > @@ -239,8 +239,8 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
> > /* pxmitbuf->priv_data will be NULL, and will crash here */
> > if (pxmitbuf->len > 0 &&
> > pxmitbuf->priv_data) {
> > - struct xmit_frame *pframe;
> > - pframe = (struct xmit_frame *)pxmitbuf->priv_data;
> > + struct xmit_frame *pframe = pxmitbuf->priv_data;
> > +
>
> If the cast is not needed, that can be dropped, but really, I don't see
> what is wrong with the original code, do you?
>
> What tool is asking you to make this change?
>
> thanks,
>
> greg k-h
© 2016 - 2026 Red Hat, Inc.