lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 12 Nov 2014 12:16:05 +0900
From:	Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>
To:	Zhang Zhen <zhenzhang.zhang@...wei.com>
CC:	David Rientjes <rientjes@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Dave Hansen <dave.hansen@...el.com>,
	Linux MM <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
	<wangnan0@...wei.com>
Subject: Re: [PATCH] memory-hotplug: remove redundant call of page_to_pfn

(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@...wei.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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ