lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025121709-cuddly-essential-46e3@gregkh>
Date: Wed, 17 Dec 2025 14:07:50 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Can Peng <pengcan@...inos.cn>
Cc: weibu@...admin.org, karanja99erick@...il.com,
	linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] staging: rtl8723bs: use LIST_HEAD for
 stack-allocated list in xmit cleanup

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@...inos.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ