summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClemens Gruber <clemens.gruber@pqgruber.com>2019-09-22 15:25:51 +0200
committerRussell King <rmk+kernel@armlinux.org.uk>2019-10-27 22:14:34 +0100
commit032be72806d1b34db7057f2c7982d87ed2274751 (patch)
tree5c937d582ec7beaf864855a003a7e51373c4de2d
parentLinux 5.4-rc5 (diff)
downloadlinux-032be72806d1b34db7057f2c7982d87ed2274751.tar.xz
linux-032be72806d1b34db7057f2c7982d87ed2274751.zip
ARM: 8907/1: arch: reuse addr variable in pfn_valid
Avoid calling __pfn_to_phys twice. Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--arch/arm/mm/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index b4be3baa83d4..a373e9f59fd4 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -180,7 +180,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