Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arch/sparc/mm: Use GFP_KERNEL

GFP_ATOMIC is not needed here, as evidenced by the other two uses of
GFP_KERNEL in the same function.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ identifier f; @@

*f(...,GFP_ATOMIC,...)
... when != spin_unlock(...)
when != read_unlock(...)
when != write_unlock(...)
when != read_unlock_irq(...)
when != write_unlock_irq(...)
when != read_unlock_irqrestore(...)
when != write_unlock_irqrestore(...)
when != spin_unlock_irq(...)
when != spin_unlock_irqrestore(...)
*f(...,GFP_KERNEL,...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Julia Lawall and committed by
David S. Miller
71cd03b0 7765b8bb

+1 -1
+1 -1
arch/sparc/mm/iommu.c
··· 63 63 unsigned long *bitmap; 64 64 unsigned long tmp; 65 65 66 - iommu = kmalloc(sizeof(struct iommu_struct), GFP_ATOMIC); 66 + iommu = kmalloc(sizeof(struct iommu_struct), GFP_KERNEL); 67 67 if (!iommu) { 68 68 prom_printf("Unable to allocate iommu structure\n"); 69 69 prom_halt();