diff mbox series

[3/4] dmaengine: mediatek: use GFP_NOWAIT instead of GFP_ATOMIC in prep_dma

Message ID CABnWg9scYTkZ242STBop4yXNKsEzgd1gsGoZQzvrurL5nYhUQw@mail.gmail.com (mailing list archive)
State Superseded
Headers show
Series [1/4] dmaengine: mediatek: free the proper desc in desc_free handler | expand

Commit Message

Guillaume Ranquet May 3, 2021, 3:26 p.m. UTC
As recommended by the doc in:
Documentation/drivers-api/dmaengine/provider.rst

Use GFP_NOWAIT to not deplete the emergency pool.

Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
diff mbox series

Patch

diff --git a/drivers/dma/mediatek/mtk-uart-apdma.c
b/drivers/dma/mediatek/mtk-uart-apdma.c
index 249cabddb7ee..4711bec04b98 100644
--- a/drivers/dma/mediatek/mtk-uart-apdma.c
+++ b/drivers/dma/mediatek/mtk-uart-apdma.c
@@ -349,7 +349,7 @@  static struct dma_async_tx_descriptor
*mtk_uart_apdma_prep_slave_sg
 		return NULL;

 	/* Now allocate and setup the descriptor */
-	d = kzalloc(sizeof(*d), GFP_ATOMIC);
+	d = kzalloc(sizeof(*d), GFP_NOWAIT);
 	if (!d)
 		return NULL;