Thread (74 messages) 74 messages, 7 authors, 2022-02-25
STALE1583d REVIEWED: 1 (0M)

[PATCH 09/22] usb: cdns3: Don't use GFP_DMA when calling dma_alloc_coherent()

From: Baoquan He <hidden>
Date: 2022-02-19 00:54:42
Also in: linux-crypto, linux-i2c, linux-mm, linux-s390, lkml
Subsystem: cadence usb3 drd ip driver, the rest, usb subsystem · Maintainers: Peter Chen, Pawel Laszczak, Linus Torvalds, Greg Kroah-Hartman

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.

[ 42.hyeyoo@gmail.com: Update changelog ]

Signed-off-by: Baoquan He <redacted>
Acked-by: Hyeonggon Yoo <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help