From: Cody P Schafer Date: Mon, 29 Apr 2013 22:08:02 +0000 (-0700) Subject: x86/mm/numa: use setup_nr_node_ids() instead of opencoding. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d2ad351e36e333c6e1a474b2c5d635828f53a173;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git x86/mm/numa: use setup_nr_node_ids() instead of opencoding. Signed-off-by: Cody P Schafer Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Benjamin Herrenschmidt Acked-by: Yinghai Lu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 72fe01e9e414..a71c4e207679 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -114,14 +114,11 @@ void numa_clear_node(int cpu) */ void __init setup_node_to_cpumask_map(void) { - unsigned int node, num = 0; + unsigned int node; /* setup nr_node_ids if not done yet */ - if (nr_node_ids == MAX_NUMNODES) { - for_each_node_mask(node, node_possible_map) - num = node; - nr_node_ids = num + 1; - } + if (nr_node_ids == MAX_NUMNODES) + setup_nr_node_ids(); /* allocate the map */ for (node = 0; node < nr_node_ids; node++)