From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Kuen-Han Tsai <khtsai@google.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] usb: gadget: f_loopback: Use auto-cleanup for usb_request
Date: Thu, 30 Oct 2025 16:34:22 +0100 [thread overview]
Message-ID: <2025103059-suitable-mulberry-45e0@gregkh> (raw)
In-Reply-To: <20251030-auto-cleanup-v1-2-db30584fadfd@google.com>
On Thu, Oct 30, 2025 at 11:14:20PM +0800, Kuen-Han Tsai wrote:
> Refactor f_loopback.c to use auto-cleanup mechanism for usb_request
> allocations in alloc_requests().
>
> The shared buffer between in_req and out_req is handled by nullifying
> in_req->buf before returning on usb_ep_queue failure, ensuring the
> buffer is only freed once by the out_req cleanup.
Same here, it's tricky stuff, and you are only saving 4 lines of code?
Not really worth it I would think.
thanks,
greg k-h
prev parent reply other threads:[~2025-10-30 15:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 15:14 [PATCH 0/2] usb: gadget: Auto-cleanup usb_request in f_loopback, f_tcm Kuen-Han Tsai
2025-10-30 15:14 ` [PATCH 1/2] usb: gadget: f_tcm: Use auto-cleanup for usb_request Kuen-Han Tsai
2025-10-30 15:33 ` Greg Kroah-Hartman
2025-11-03 9:54 ` Kuen-Han Tsai
2025-10-30 15:14 ` [PATCH 2/2] usb: gadget: f_loopback: " Kuen-Han Tsai
2025-10-30 15:34 ` Greg Kroah-Hartman [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=2025103059-suitable-mulberry-45e0@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Thinh.Nguyen@synopsys.com \
--cc=khtsai@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.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