Skip to content

Commit

Permalink
x86-64, NUMA: Remove local variable found from amd_numa_init()
Browse files Browse the repository at this point in the history
Use weight count on mem_nodes_parsed instead.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Shaohui Zheng <shaohui.zheng@intel.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: H. Peter Anvin <hpa@linux.intel.com>
  • Loading branch information
Tejun Heo committed Feb 16, 2011
1 parent ec8cf29 commit 99df738
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arch/x86/mm/amdtopology_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ int __init amd_numa_init(void)
unsigned long end = PFN_PHYS(max_pfn);
unsigned numnodes;
unsigned long prevbase;
int i, nb, found = 0;
int i, nb;
u32 nodeid, reg;

if (!early_pci_allowed())
Expand Down Expand Up @@ -165,8 +165,6 @@ int __init amd_numa_init(void)
pr_info("Node %d MemBase %016lx Limit %016lx\n",
nodeid, base, limit);

found++;

nodes[nodeid].start = base;
nodes[nodeid].end = limit;

Expand All @@ -176,7 +174,7 @@ int __init amd_numa_init(void)
node_set(nodeid, cpu_nodes_parsed);
}

if (!found)
if (!nodes_weight(mem_nodes_parsed))
return -ENOENT;
return 0;
}
Expand Down

0 comments on commit 99df738

Please sign in to comment.