ar71xx/ath79: ag71xx: init rings with GFP_KERNEL
authorKoen Vandeputte <koen.vandeputte@ncentric.com>
Fri, 9 Aug 2019 07:51:29 +0000 (09:51 +0200)
committerKoen Vandeputte <koen.vandeputte@ncentric.com>
Fri, 9 Aug 2019 16:32:38 +0000 (18:32 +0200)
Upstream commit 246902bdf562d45ea3475fac64c93048a7a39f01

Which contains following explanation:

--
There is no need to use GFP_ATOMIC here, GFP_KERNEL should be enough.
The 'kcalloc()' just a few lines above, already uses GFP_KERNEL.
--

Looking at the code, all other descriptors also use plain GFP_KERNEL

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c

index 40f8aaa20a4763b6ef16376e1a0632340f1b497e..b540a56a3abbc31072dd53eef334cb96e6953e7f 100644 (file)
@@ -277,7 +277,7 @@ static int ag71xx_rings_init(struct ag71xx *ag)
                return -ENOMEM;
 
        tx->descs_cpu = dma_alloc_coherent(&ag->pdev->dev, ring_size * AG71XX_DESC_SIZE,
-                                          &tx->descs_dma, GFP_ATOMIC);
+                                          &tx->descs_dma, GFP_KERNEL);
        if (!tx->descs_cpu) {
                kfree(tx->buf);
                tx->buf = NULL;