From: Guixiong Wei <guixiongwei@gmail.com>
To: catalin.marinas@arm.com, will@kernel.org
Cc: nsaenzjulienne@suse.de, steve.capper@arm.com,
akpm@linux-foundation.org, guro@fb.com, tglx@linutronix.de,
rppt@linux.ibm.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Guixiong Wei <guixiongwei@gmail.com>
Subject: [PATCH] arm: mm: use __pfn_to_section() to get mem_section
Date: Thu, 30 Apr 2020 18:04:37 +1400 [thread overview]
Message-ID: <20200430040437.119591-1-guixiongwei@gmail.com> (raw)
Use __pfn_to_section() to get mem_section, instead of open-coding it.
No semantic changes.
Signed-off-by: Guixiong Wei <guixiongwei@gmail.com>
---
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
next reply other threads:[~2020-04-30 4:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 4:04 Guixiong Wei [this message]
2020-04-30 5:01 ` Anshuman Khandual
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200430040437.119591-1-guixiongwei@gmail.com \
--to=guixiongwei@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=guro@fb.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nsaenzjulienne@suse.de \
--cc=rppt@linux.ibm.com \
--cc=steve.capper@arm.com \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®