[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190902164622.18593-1-clemens.gruber@pqgruber.com>
Date: Mon, 2 Sep 2019 18:46:22 +0200
From: Clemens Gruber <clemens.gruber@...ruber.com>
To: linux-arm-kernel@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org,
Clemens Gruber <clemens.gruber@...ruber.com>,
Russell King <linux@...linux.org.uk>,
Mike Rapoport <rppt@...ux.ibm.com>,
zhaoyang <huangzhaoyang@...il.com>
Subject: [PATCH] arch: arm: reuse addr variable in pfn_valid
Avoid calling __pfn_to_phys twice.
Cc: Russell King <linux@...linux.org.uk>
Cc: Mike Rapoport <rppt@...ux.ibm.com>
Cc: zhaoyang <huangzhaoyang@...il.com>
Signed-off-by: Clemens Gruber <clemens.gruber@...ruber.com>
---
arch/arm/mm/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
--
2.23.0
Powered by blists - more mailing lists