From: Clemens Gruber Date: Sun, 22 Sep 2019 13:25:51 +0000 (+0100) Subject: ARM: 8907/1: arch: reuse addr variable in pfn_valid X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=032be72806d1b34db7057f2c7982d87ed2274751;p=openwrt%2Fstaging%2Fblogic.git ARM: 8907/1: arch: reuse addr variable in pfn_valid Avoid calling __pfn_to_phys twice. Signed-off-by: Clemens Gruber Signed-off-by: Russell King --- 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