From: Cody P Schafer Date: Tue, 26 Mar 2013 23:24:46 +0000 (+1100) Subject: powerpc/mm/numa: use setup_nr_node_ids() instead of opencoding. X-Git-Tag: next-20130404~3^2~362 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6f060826e10505c5529ae02c3918c8d12d5df619;p=karo-tx-linux.git powerpc/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 Cc: Yinghai Lu Signed-off-by: Andrew Morton --- diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index bba87ca2b4d7..7574ae334a3b 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++)