dma_alloc_coherent() allocates dma buffer with device's addressing
limitation in mind. It's redundent to specify GFP_DMA when calling
dma_alloc_coherent(). replace it with GFP_KERNEL.
[ [email protected]: Update changelog ]
Signed-off-by: Baoquan He <[email protected]>
Acked-by: Hyeonggon Yoo <[email protected]>
---
drivers/usb/cdns3/cdns3-gadget.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c
index f9af7ebe003d..c0937d3d663f 100644
--- a/drivers/usb/cdns3/cdns3-gadget.c
+++ b/drivers/usb/cdns3/cdns3-gadget.c
@@ -3203,7 +3203,7 @@ static int cdns3_gadget_start(struct cdns *cdns)
/* allocate memory for setup packet buffer */
priv_dev->setup_buf = dma_alloc_coherent(priv_dev->sysdev, 8,
- &priv_dev->setup_dma, GFP_DMA);
+ &priv_dev->setup_dma, GFP_KERNEL);
if (!priv_dev->setup_buf) {
ret = -ENOMEM;
goto err2;
--
2.17.2
On Sat, Feb 19, 2022 at 08:52:08AM +0800, Baoquan He wrote:
> dma_alloc_coherent() allocates dma buffer with device's addressing
> limitation in mind. It's redundent to specify GFP_DMA when calling
> dma_alloc_coherent(). replace it with GFP_KERNEL.
Plase avoid the overly long line. The rest looks good.