Skip to contentSkip to conversation

arm: mm: use __pfn_to_section() to get mem_section

PATCH Applied Guixiong Wei 2 participants 2 messages Apr 30, 2020 arm64

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 arm: mm: use __pfn_to_section() to get mem_section

__pfn_to_section() helper which already wraps around __nr_to_section(pfn_to_section_nr(pfn)), should be used directly instead.

---

v1 -> v2
- reword the commit message.

---
 arch/arm64/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/mm/init.c +1 -1
index e42727e3568e..d2df416b840e 100644
@@ -272,7 +272,7 @@ int pfn_valid(unsigned long pfn)
 	if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)
 		return 0;
 
-	if (!valid_section(__nr_to_section(pfn_to_section_nr(pfn))))
+	if (!valid_section(__pfn_to_section(pfn)))
 		return 0;
 #endif
 	return memblock_is_map_memory(addr);
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Applied
#1 lore raw
Quoted 3 lines · Guixiong Wei

__pfn_to_section() helper which already wraps around __nr_to_section(pfn_to_section_nr(pfn)), should be used directly instead.

Applied to arm64 (for-next/misc), thanks!

[1/1] arm: mm: use __pfn_to_section() to get mem_section

      https://git.kernel.org/arm64/c/037d9303a7e7

Cheers,

Signature · 4 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev