]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
dmaengine: mediatek: use GFP_NOWAIT instead of GFP_ATOMIC in prep_dma
authorGuillaume Ranquet <granquet@baylibre.com>
Thu, 13 May 2021 19:26:42 +0000 (21:26 +0200)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:47:46 +0000 (08:47 -0400)
[ Upstream commit 9041575348b21ade1fb74d790f1aac85d68198c7 ]

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>
Link: https://lore.kernel.org/r/20210513192642.29446-4-granquet@baylibre.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/mediatek/mtk-uart-apdma.c

index e420e9f72b3dd665065868e0ea128f8a22de6d34..9c0ea13ca78835d6848e5b1f31ed51e2e684c6d0 100644 (file)
@@ -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;