]> git.karo-electronics.de Git - linux-beck.git/commitdiff
x86-64, NUMA: Remove local variable found from amd_numa_init()
authorTejun Heo <tj@kernel.org>
Wed, 16 Feb 2011 11:13:07 +0000 (12:13 +0100)
committerTejun Heo <tj@kernel.org>
Wed, 16 Feb 2011 11:13:07 +0000 (12:13 +0100)
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>
arch/x86/mm/amdtopology_64.c

index 4f822a2471252d40ded3af6c9fdda92a5ce1ef5d..7d85cf7e03247d32eb4c7774771e9725793c4ce0 100644 (file)
@@ -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())
@@ -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;
 
@@ -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;
 }