Skip to content

Commit

Permalink
x86/mm/numa: use setup_nr_node_ids() instead of opencoding.
Browse files Browse the repository at this point in the history
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Cody P Schafer authored and Linus Torvalds committed Apr 29, 2013
1 parent f9872ca commit d2ad351
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions arch/x86/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down

0 comments on commit d2ad351

Please sign in to comment.