dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/4] dmaengine: mediatek: use GFP_NOWAIT instead of GFP_ATOMIC in prep_dma
@ 2021-05-03 15:26 Guillaume Ranquet
  0 siblings, 0 replies; only message in thread
From: Guillaume Ranquet @ 2021-05-03 15:26 UTC (permalink / raw)
  Cc: Sean Wang, Vinod Koul, Dan Williams, Matthias Brugger, dmaengine,
	linux-arm-kernel, linux-mediatek, linux-kernel

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 --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;

-- 
2.26.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-03 15:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03 15:26 [PATCH 3/4] dmaengine: mediatek: use GFP_NOWAIT instead of GFP_ATOMIC in prep_dma Guillaume Ranquet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).