* [PATCH 1/1] staging: rtl8723bs: use LIST_HEAD for stack-allocated list in xmit cleanup
@ 2025-12-15 3:11 Can Peng
2025-12-17 13:07 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Can Peng @ 2025-12-15 3:11 UTC (permalink / raw)
To: gregkh, weibu, karanja99erick; +Cc: linux-staging, linux-kernel, Can Peng
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);
spin_lock_bh(&pqueue->lock);
if (!list_empty(&pqueue->queue)) {
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 1/1] staging: rtl8723bs: use LIST_HEAD for stack-allocated list in xmit cleanup
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
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2025-12-17 13:07 UTC (permalink / raw)
To: Can Peng; +Cc: weibu, karanja99erick, linux-staging, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-17 13:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox