From: David Hildenbrand <david@redhat.com>
To: qiwuchen55@gmail.com, akpm@linux-foundation.org
Cc: linux-mm@kvack.org, chenqiwu <chenqiwu@xiaomi.com>
Subject: Re: [PATCH] mm/memory_hotplug: use __pfn_to_section() instead of open-coding
Date: Mon, 16 Mar 2020 13:23:09 +0100 [thread overview]
Message-ID: <7df11a88-2819-00e2-c073-6065e303aa75@redhat.com> (raw)
In-Reply-To: <1584345134-16671-1-git-send-email-qiwuchen55@gmail.com>
On 16.03.20 08:52, qiwuchen55@gmail.com wrote:
> From: chenqiwu <chenqiwu@xiaomi.com>
>
> Use __pfn_to_section() API instead of open-coding or better
s/or/for/
> code readability.
>
> Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
> ---
> mm/memory_hotplug.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index 19389cd..62e9c66 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -494,7 +494,7 @@ static void __remove_section(unsigned long pfn, unsigned long nr_pages,
> unsigned long map_offset,
> struct vmem_altmap *altmap)
> {
> - struct mem_section *ms = __nr_to_section(pfn_to_section_nr(pfn));
> + struct mem_section *ms = __pfn_to_section(pfn);
>
> if (WARN_ON_ONCE(!valid_section(ms)))
> return;
>
Acked-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2020-03-16 12:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-16 7:52 qiwuchen55
2020-03-16 12:23 ` David Hildenbrand [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=7df11a88-2819-00e2-c073-6065e303aa75@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=chenqiwu@xiaomi.com \
--cc=linux-mm@kvack.org \
--cc=qiwuchen55@gmail.com \
/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