From: Greg KH <gregkh@linuxfoundation.org>
To: Ashmit Kumar <work.ashmitkumar@gmail.com>
Cc: mchehab@kernel.org, linux-staging@lists.linux.dev,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] staging: rtl8723bs: Replace custom rtw_cbuf with kfifo
Date: Thu, 6 Aug 2026 06:52:30 +0200 [thread overview]
Message-ID: <2026080628-album-pandemic-ddff@gregkh> (raw)
In-Reply-To: <20260805183317.85489-1-work.ashmitkumar@gmail.com>
On Wed, Aug 05, 2026 at 06:33:16PM +0000, Ashmit Kumar wrote:
> The rtl8723bs driver implemented its own custom circular buffer
> (rtw_cbuf) for c2h event handling. The kernel already provides a standard,
> lockless circular buffer implementation in <linux/kfifo.h>.
>
> This patch replaces the custom rtw_cbuf struct and its associated
> functions with the standard kfifo API (kfifo_alloc, kfifo_put,
> kfifo_get, kfifo_is_empty, kfifo_free), simplifying the driver code
> and relying on the robust kernel infrastructure. Furthermore, the allocation
> size is simplified to C2H_QUEUE_MAX_LEN, dropping the vestigial + 1 that
> the original naive ring buffer required to disambiguate full from empty.
>
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ashmit Kumar <work.ashmitkumar@gmail.com>
> ---
> Changes in v4:
> - Abandoned ternary operator style fixes in favor of completely
> replacing the custom rtw_cbuf ring buffer with the standard Linux
> kfifo API, as suggested by Greg Kroah-Hartman.
Great, how was this tested?
> @@ -58,7 +59,7 @@
> struct evt_priv {
> struct work_struct c2h_wk;
> bool c2h_wk_alive;
> - struct rtw_cbuf *c2h_queue;
> + DECLARE_KFIFO_PTR(c2h_queue, void *);
Why did you loose the type of the pointer? Was a LLM used to create
this change?
thanks,
greg k-h
next prev parent reply other threads:[~2026-08-06 4:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 18:33 [PATCH v4] staging: rtl8723bs: Replace custom rtw_cbuf with kfifo Ashmit Kumar
2026-08-06 4:52 ` Greg KH [this message]
2026-08-06 10:55 ` Ashmit Kumar
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=2026080628-album-pandemic-ddff@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=work.ashmitkumar@gmail.com \
/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