Re: [PATCH v2] staging: rtl8723bs: use single-line initialization for pframe
From: Greg KH
Date: Fri Apr 03 2026 - 14:03:03 EST
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@xxxxxxxxx>
> ---
> 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