linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arm: mm: use __pfn_to_section() to get mem_section
@ 2020-04-30 16:18 Guixiong Wei
  2020-04-30 21:12 ` Will Deacon
  0 siblings, 1 reply; 2+ messages in thread
From: Guixiong Wei @ 2020-04-30 16:18 UTC (permalink / raw)
  To: catalin.marinas, will
  Cc: steve.capper, linux-kernel, rppt, linux-arm-kernel, guro, akpm,
	Guixiong Wei, tglx, nsaenzjulienne

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

Signed-off-by: Guixiong Wei <guixiongwei@gmail.com>
---

v1 -> v2
- reword the commit message.

---
 arch/arm64/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index e42727e3568e..d2df416b840e 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -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);
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] arm: mm: use __pfn_to_section() to get mem_section
  2020-04-30 16:18 [PATCH v2] arm: mm: use __pfn_to_section() to get mem_section Guixiong Wei
@ 2020-04-30 21:12 ` Will Deacon
  0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2020-04-30 21:12 UTC (permalink / raw)
  To: Guixiong Wei, catalin.marinas
  Cc: akpm, steve.capper, linux-kernel, rppt, linux-arm-kernel, tglx,
	Will Deacon, guro, nsaenzjulienne

On Fri, 1 May 2020 06:18:58 +1400, Guixiong Wei wrote:
> __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,
-- 
Will

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-30 21:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30 16:18 [PATCH v2] arm: mm: use __pfn_to_section() to get mem_section Guixiong Wei
2020-04-30 21:12 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).