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.
Unified · Split
| @@ -1141,7 +1141,7 @@ static int ag71xx_rings_init(struct ag71xx *ag) · 1140 unmodified lines | |||
| 1141 | 1141 | ||
| 1142 | tx->descs_cpu = dma_alloc_coherent(&ag->pdev->dev, | 1142 | tx->descs_cpu = dma_alloc_coherent(&ag->pdev->dev, |
| 1143 | ring_size * AG71XX_DESC_SIZE, | 1143 | ring_size * AG71XX_DESC_SIZE, |
| 1144 | &tx->descs_dma, GFP_ATOMIC); | 1144 | &tx->descs_dma, GFP_KERNEL); |
| 1145 | if (!tx->descs_cpu) { | 1145 | if (!tx->descs_cpu) { |
| 1146 | kfree(tx->buf); | 1146 | kfree(tx->buf); |
| 1147 | tx->buf = NULL; | 1147 | tx->buf = NULL; |