]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
arm64: use is_vmalloc_addr
authorMiles Chen <miles.chen@mediatek.com>
Thu, 9 Feb 2017 11:45:34 +0000 (19:45 +0800)
committerWill Deacon <will.deacon@arm.com>
Thu, 9 Feb 2017 13:47:56 +0000 (13:47 +0000)
To is_vmalloc_addr() to check if an address is a vmalloc address
instead of checking VMALLOC_START and VMALLOC_END manually.

Signed-off-by: Miles Chen <miles.chen@mediatek.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/mm/ioremap.c

index 01e88c8bcab0fd4aa96409fe751745141737cb39..c4c8cd4c31d4933eb0d776618bb1c49c43beb1fa 100644 (file)
@@ -88,7 +88,7 @@ void __iounmap(volatile void __iomem *io_addr)
         * We could get an address outside vmalloc range in case
         * of ioremap_cache() reusing a RAM mapping.
         */
-       if (VMALLOC_START <= addr && addr < VMALLOC_END)
+       if (is_vmalloc_addr((void *)addr))
                vunmap((void *)addr);
 }
 EXPORT_SYMBOL(__iounmap);