diff mbox

[v2] arm64: use is_vmalloc_addr

Message ID 1486640734-27637-1-git-send-email-miles.chen@mediatek.com (mailing list archive)
State New, archived
Headers show

Commit Message

Miles Chen Feb. 9, 2017, 11:45 a.m. UTC
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>
---
 arch/arm64/mm/ioremap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andreas Färber Feb. 13, 2017, 5:20 a.m. UTC | #1
Hi,

Am 09.02.2017 um 12:45 schrieb Miles Chen:
> To is_vmalloc_addr() to check if an address is a vmalloc address

"Use ..."?

Regards,
Andreas

> instead of checking VMALLOC_START and VMALLOC_END manually.
> 
> Signed-off-by: Miles Chen <miles.chen@mediatek.com>
Miles Chen Feb. 13, 2017, 12:52 p.m. UTC | #2
On Mon, 2017-02-13 at 06:20 +0100, Andreas Färber wrote:
> Hi,
> 
> Am 09.02.2017 um 12:45 schrieb Miles Chen:
> > To is_vmalloc_addr() to check if an address is a vmalloc address
> 
> "Use ..."?

Yes, it should be "Use". I'll send another patch to fix this.

> 
> Regards,
> Andreas
> 
> > instead of checking VMALLOC_START and VMALLOC_END manually.
> > 
> > Signed-off-by: Miles Chen <miles.chen@mediatek.com>
>
diff mbox

Patch

diff --git a/arch/arm64/mm/ioremap.c b/arch/arm64/mm/ioremap.c
index 01e88c8..c4c8cd4 100644
--- a/arch/arm64/mm/ioremap.c
+++ b/arch/arm64/mm/ioremap.c
@@ -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);