diff mbox series

arch: arm: reuse addr variable in pfn_valid

Message ID 20190902164622.18593-1-clemens.gruber@pqgruber.com (mailing list archive)
State Mainlined
Commit 032be72806d1b34db7057f2c7982d87ed2274751
Headers show
Series arch: arm: reuse addr variable in pfn_valid | expand

Commit Message

Clemens Gruber Sept. 2, 2019, 4:46 p.m. UTC
Avoid calling __pfn_to_phys twice.

Cc: Russell King <linux@armlinux.org.uk>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: zhaoyang <huangzhaoyang@gmail.com>
Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
---
 arch/arm/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 98e17388a563..a5fe2bdc76de 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -179,7 +179,7 @@  int pfn_valid(unsigned long pfn)
 	if (__phys_to_pfn(addr) != pfn)
 		return 0;
 
-	return memblock_is_map_memory(__pfn_to_phys(pfn));
+	return memblock_is_map_memory(addr);
 }
 EXPORT_SYMBOL(pfn_valid);
 #endif