aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/numa.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-07-12 03:58:09 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2011-07-13 19:36:01 -0400
commit1f5026a7e21e409c2b9dd54f6dfb9446511fb7c5 (patch)
treebcf0529d5f05ea8b685d6c0fddcb3197c2fab49c /arch/x86/mm/numa.c
parent348968eb151e2569ad0ebe19b2f9c3c25b5c816a (diff)
memblock: Kill MEMBLOCK_ERROR
25818f0f28 (memblock: Make MEMBLOCK_ERROR be 0) thankfully made MEMBLOCK_ERROR 0 and there already are codes which expect error return to be 0. There's no point in keeping MEMBLOCK_ERROR around. End its misery. Signed-off-by: Tejun Heo <tj@kernel.org> Link: http://lkml.kernel.org/r/1310457490-3356-6-git-send-email-tj@kernel.org Cc: Yinghai Lu <yinghai@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/mm/numa.c')
-rw-r--r--arch/x86/mm/numa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index fbeaaf416610..fa1015de5cc0 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -226,10 +226,10 @@ static void __init setup_node_data(int nid, u64 start, u64 end)
226 } else { 226 } else {
227 nd_pa = memblock_x86_find_in_range_node(nid, nd_low, nd_high, 227 nd_pa = memblock_x86_find_in_range_node(nid, nd_low, nd_high,
228 nd_size, SMP_CACHE_BYTES); 228 nd_size, SMP_CACHE_BYTES);
229 if (nd_pa == MEMBLOCK_ERROR) 229 if (!nd_pa)
230 nd_pa = memblock_find_in_range(nd_low, nd_high, 230 nd_pa = memblock_find_in_range(nd_low, nd_high,
231 nd_size, SMP_CACHE_BYTES); 231 nd_size, SMP_CACHE_BYTES);
232 if (nd_pa == MEMBLOCK_ERROR) { 232 if (!nd_pa) {
233 pr_err("Cannot find %zu bytes in node %d\n", 233 pr_err("Cannot find %zu bytes in node %d\n",
234 nd_size, nid); 234 nd_size, nid);
235 return; 235 return;
@@ -395,7 +395,7 @@ static int __init numa_alloc_distance(void)
395 395
396 phys = memblock_find_in_range(0, PFN_PHYS(max_pfn_mapped), 396 phys = memblock_find_in_range(0, PFN_PHYS(max_pfn_mapped),
397 size, PAGE_SIZE); 397 size, PAGE_SIZE);
398 if (phys == MEMBLOCK_ERROR) { 398 if (!phys) {
399 pr_warning("NUMA: Warning: can't allocate distance table!\n"); 399 pr_warning("NUMA: Warning: can't allocate distance table!\n");
400 /* don't retry until explicitly reset */ 400 /* don't retry until explicitly reset */
401 numa_distance = (void *)1LU; 401 numa_distance = (void *)1LU;