From: Can Peng <pengcan@kylinos.cn>
To: gregkh@linuxfoundation.org, weibu@redadmin.org, karanja99erick@gmail.com
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Can Peng <pengcan@kylinos.cn>
Subject: [PATCH 1/1] staging: rtl8723bs: use LIST_HEAD for stack-allocated list in xmit cleanup
Date: Mon, 15 Dec 2025 11:11:50 +0800 [thread overview]
Message-ID: <20251215031150.49165-1-pengcan@kylinos.cn> (raw)
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
next reply other threads:[~2025-12-15 3:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-15 3:11 Can Peng [this message]
2025-12-17 13:07 ` [PATCH 1/1] staging: rtl8723bs: use LIST_HEAD for stack-allocated list in xmit cleanup Greg KH
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=20251215031150.49165-1-pengcan@kylinos.cn \
--to=pengcan@kylinos.cn \
--cc=gregkh@linuxfoundation.org \
--cc=karanja99erick@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--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