public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Can Peng <pengcan@kylinos.cn>
Cc: weibu@redadmin.org, karanja99erick@gmail.com,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] staging: rtl8723bs: use LIST_HEAD for stack-allocated list in xmit cleanup
Date: Wed, 17 Dec 2025 14:07:50 +0100	[thread overview]
Message-ID: <2025121709-cuddly-essential-46e3@gregkh> (raw)
In-Reply-To: <20251215031150.49165-1-pengcan@kylinos.cn>

On Mon, Dec 15, 2025 at 11:11:50AM +0800, Can Peng wrote:
> Replace the separate declaration of 'tmplist' and subsequent
> INIT_LIST_HEAD() call with LIST_HEAD(), which declares and
> initializes the list head in a single idiomatic step. This
> improves code clarity and follows common kernel coding patterns
> without changing functionality.
> 
> Signed-off-by: Can Peng <pengcan@kylinos.cn>
> ---
>  drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> index abb6fdfe7e1f..8c227ddc8e53 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> @@ -548,11 +548,10 @@ void rtl8723bs_free_xmit_priv(struct adapter *padapter)
>  	struct xmit_buf *pxmitbuf;
>  	struct __queue *pqueue = &pxmitpriv->pending_xmitbuf_queue;
>  	struct list_head *plist, *phead;
> -	struct list_head tmplist;
> +	LIST_HEAD(tmplist);
>  
>  
>  	phead = get_list_head(pqueue);
> -	INIT_LIST_HEAD(&tmplist);

Is this really needed?  I see the wish to clean stuff like this up, but
why?  What is causing this to happen?  The code is identical both ways,
right?

This feels like an odd change to me.

thanks,

greg k-h

      reply	other threads:[~2025-12-17 13:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15  3:11 [PATCH 1/1] staging: rtl8723bs: use LIST_HEAD for stack-allocated list in xmit cleanup Can Peng
2025-12-17 13:07 ` Greg KH [this message]

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=2025121709-cuddly-essential-46e3@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=karanja99erick@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=pengcan@kylinos.cn \
    --cc=weibu@redadmin.org \
    /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