Re: [PATCH v2] usb: core: warn if a GFP zone flag is passed to hcd_buffer_alloc()
From: Petr Tesařík
Date: Wed Apr 09 2025 - 12:00:06 EST
On Tue, 25 Mar 2025 14:40:00 +0100
Petr Tesarik <ptesarik@xxxxxxxx> wrote:
> Remove a misleading comment and issue a warning if a zone modifier is
> specified when allocating a hcd buffer.
>
> There is no valid use case for a GFP zone modifier in hcd_buffer_alloc():
> - PIO mode can use any kernel-addressable memory
> - dma_alloc_coherent() ignores memory zone bits
>
> This function is called by usb_alloc_coherent() and indirectly by
> usb_submit_urb(). Despite the comment, no in-tree users currently pass
> GFP_DMA.
>
> Signed-off-by: Petr Tesarik <ptesarik@xxxxxxxx>
I know this was posted during the merge window, but that's now over.
Any comment on this patch?
Petr T