lkml.org 
[lkml]   [2020]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/mm: Remove the redundant conditional check
On Sun 08-03-20 09:35:11, Baoquan He wrote:
> In commit f70029bbaacbfa8f0 ("mm, memory_hotplug: drop CONFIG_MOVABLE_NODE"),
> the dependency on CONFIG_MOVABLE_NODE was removed for N_MEMORY, so the
> conditional check in paging_init() doesn't make any sense any more.
> Remove it.

Please expand more. I would really have to refresh the intention of the
code but from a quick look at the code CONFIG_HIGHMEM still makes
N_MEMORY != N_NORMAL_MEMORY. So what what does this change mean for that
config?

> Signed-off-by: Baoquan He <bhe@redhat.com>
> ---
> arch/x86/mm/init_64.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
> index abbdecb75fad..0a14711d3a93 100644
> --- a/arch/x86/mm/init_64.c
> +++ b/arch/x86/mm/init_64.c
> @@ -818,8 +818,7 @@ void __init paging_init(void)
> * will not set it back.
> */
> node_clear_state(0, N_MEMORY);
> - if (N_MEMORY != N_NORMAL_MEMORY)
> - node_clear_state(0, N_NORMAL_MEMORY);
> + node_clear_state(0, N_NORMAL_MEMORY);
>
> zone_sizes_init();
> }
> --
> 2.17.2
>

--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2020-03-10 11:11    [W:1.445 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site