From: Cody P Schafer Date: Mon, 29 Apr 2013 22:08:03 +0000 (-0700) Subject: powerpc/mm/numa: use setup_nr_node_ids() instead of opencoding. X-Git-Tag: v3.10-rc1~183^2~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9d531b8dcd1b62a7bf96f29212ca80b58f96e82;p=profile%2Fivi%2Fkernel-x86-ivi.git powerpc/mm/numa: use setup_nr_node_ids() instead of opencoding. [sfr@canb.auug.org.au: add missing semicolon] Signed-off-by: Cody P Schafer Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Benjamin Herrenschmidt Cc: Yinghai Lu Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index bba87ca..b8020dc 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -62,14 +62,11 @@ static int distance_lookup_table[MAX_NUMNODES][MAX_DISTANCE_REF_POINTS]; */ static 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++)