Skip to contentSkip to conversation

ARM: mm: iomap: use is_vmalloc_addr

PATCH New Gustavo A. R. Silva 1 participant 1 message Jul 14, 2017 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mm: iomap: use is_vmalloc_addr

Instead of manually checking the bounds of VMALLOC_START and VMALLOC_END, use is_vmalloc_addr. Such function was specifically designed for that purpose.

---
 arch/arm/mm/iomap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/mm/iomap.c +1 -2
index 4614208..4bf5457 100644
@@ -34,8 +34,7 @@ EXPORT_SYMBOL(pcibios_min_mem);
 
 void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
 {
-	if ((unsigned long)addr >= VMALLOC_START &&
-	    (unsigned long)addr < VMALLOC_END)
+	if (is_vmalloc_addr(addr))
 		iounmap(addr);
 }
 EXPORT_SYMBOL(pci_iounmap);
Signature · 1 line
2.5.0