]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - arch/mips/cavium-octeon/dma-octeon.c
Merge tag 'for-next-dma_ops' of git://git.kernel.org/pub/scm/linux/kernel/git/dledfor...
[mirror_ubuntu-bionic-kernel.git] / arch / mips / cavium-octeon / dma-octeon.c
index 897d32c888ee2ee956352be1f6af82297266be83..c64bd87f0b6ef06b5538459f32023cba29015289 100644 (file)
@@ -164,19 +164,14 @@ static void *octeon_dma_alloc_coherent(struct device *dev, size_t size,
        /* ignore region specifiers */
        gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM);
 
-#ifdef CONFIG_ZONE_DMA
-       if (dev == NULL)
+       if (IS_ENABLED(CONFIG_ZONE_DMA) && dev == NULL)
                gfp |= __GFP_DMA;
-       else if (dev->coherent_dma_mask <= DMA_BIT_MASK(24))
+       else if (IS_ENABLED(CONFIG_ZONE_DMA) &&
+                dev->coherent_dma_mask <= DMA_BIT_MASK(24))
                gfp |= __GFP_DMA;
-       else
-#endif
-#ifdef CONFIG_ZONE_DMA32
-            if (dev->coherent_dma_mask <= DMA_BIT_MASK(32))
+       else if (IS_ENABLED(CONFIG_ZONE_DMA32) &&
+                dev->coherent_dma_mask <= DMA_BIT_MASK(32))
                gfp |= __GFP_DMA32;
-       else
-#endif
-               ;
 
        /* Don't invoke OOM killer */
        gfp |= __GFP_NORETRY;