From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Guixiong Wei <guixiongwei@gmail.com>,
catalin.marinas@arm.com, will@kernel.org
Cc: steve.capper@arm.com, linux-kernel@vger.kernel.org,
rppt@linux.ibm.com, linux-arm-kernel@lists.infradead.org,
guro@fb.com, akpm@linux-foundation.org, tglx@linutronix.de,
nsaenzjulienne@suse.de
Subject: Re: [PATCH] arm: mm: use __pfn_to_section() to get mem_section
Date: Thu, 30 Apr 2020 10:31:53 +0530 [thread overview]
Message-ID: <bbe98908-4787-4981-0248-955b2cd2db19@arm.com> (raw)
In-Reply-To: <20200430040437.119591-1-guixiongwei@gmail.com>
On 04/30/2020 09:34 AM, Guixiong Wei wrote:
> Use __pfn_to_section() to get mem_section, instead of open-coding it.
There is no open coding here. __pfn_to_section() helper which already
wraps around __nr_to_section(pfn_to_section_nr(pfn)), should be used
directly instead.
> No semantic changes.
and functional change. Please reword the commit message.
>
> 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))
Looks good.
> return 0;
> #endif
> return memblock_is_map_memory(addr);
>
prev parent reply other threads:[~2020-04-30 5:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 4:04 Guixiong Wei
2020-04-30 5:01 ` Anshuman Khandual [this message]
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=bbe98908-4787-4981-0248-955b2cd2db19@arm.com \
--to=anshuman.khandual@arm.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=guixiongwei@gmail.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®