From: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
To: Zhang Zhen <zhenzhang.zhang@huawei.com>
Cc: David Rientjes <rientjes@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Dave Hansen <dave.hansen@intel.com>,
Linux MM <linux-mm@kvack.org>,
linux-kernel@vger.kernel.org, wangnan0@huawei.com
Subject: Re: [PATCH] memory-hotplug: remove redundant call of page_to_pfn
Date: Wed, 12 Nov 2014 12:16:05 +0900 [thread overview]
Message-ID: <5462D0F5.1050008@jp.fujitsu.com> (raw)
In-Reply-To: <5461D343.60803@huawei.com>
(2014/11/11 18:13), Zhang Zhen wrote:
> The start_pfn can be obtained directly by
> phys_index << PFN_SECTION_SHIFT.
>
> Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
> ---
The patch looks good to me but I want you to write a purpose of the patch
to the description for other reviewer.
Thanks,
Yasuaki Ishimatsu
> drivers/base/memory.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/base/memory.c b/drivers/base/memory.c
> index 7c5d871..85be040 100644
> --- a/drivers/base/memory.c
> +++ b/drivers/base/memory.c
> @@ -228,8 +228,8 @@ memory_block_action(unsigned long phys_index, unsigned long action, int online_t
> struct page *first_page;
> int ret;
>
> - first_page = pfn_to_page(phys_index << PFN_SECTION_SHIFT);
> - start_pfn = page_to_pfn(first_page);
> + start_pfn = phys_index << PFN_SECTION_SHIFT;
> + first_page = pfn_to_page(start_pfn);
>
> switch (action) {
> case MEM_ONLINE:
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-11-12 3:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1415697184-26409-1-git-send-email-zhenzhang.zhang@huawei.com>
2014-11-11 9:13 ` Zhang Zhen
2014-11-12 3:16 ` Yasuaki Ishimatsu [this message]
2014-11-12 3:42 ` Zhang Zhen
2014-11-17 19:45 ` David Rientjes
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=5462D0F5.1050008@jp.fujitsu.com \
--to=isimatu.yasuaki@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=wangnan0@huawei.com \
--cc=zhenzhang.zhang@huawei.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