ARM: 8907/1: arch: reuse addr variable in pfn_valid
authorClemens Gruber <clemens.gruber@pqgruber.com>
Sun, 22 Sep 2019 13:25:51 +0000 (14:25 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Sun, 27 Oct 2019 21:14:34 +0000 (21:14 +0000)
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>
arch/arm/mm/init.c

index b4be3baa83d4d284e96c8f29ff84266473b234bb..a373e9f59fd4368ee9c177c99b43ecfe7630d61f 100644 (file)
@@ -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