diff options
author | Tejun Heo <tj@kernel.org> | 2011-07-12 03:58:09 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-07-13 19:36:01 -0400 |
commit | 1f5026a7e21e409c2b9dd54f6dfb9446511fb7c5 (patch) | |
tree | bcf0529d5f05ea8b685d6c0fddcb3197c2fab49c /arch/x86/kernel | |
parent | 348968eb151e2569ad0ebe19b2f9c3c25b5c816a (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/kernel')
-rw-r--r-- | arch/x86/kernel/aperture_64.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/check.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/e820.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/trampoline.c | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c index 3d2661ca654..56363082bbd 100644 --- a/arch/x86/kernel/aperture_64.c +++ b/arch/x86/kernel/aperture_64.c | |||
@@ -88,7 +88,7 @@ static u32 __init allocate_aperture(void) | |||
88 | */ | 88 | */ |
89 | addr = memblock_find_in_range(GART_MIN_ADDR, GART_MAX_ADDR, | 89 | addr = memblock_find_in_range(GART_MIN_ADDR, GART_MAX_ADDR, |
90 | aper_size, aper_size); | 90 | aper_size, aper_size); |
91 | if (addr == MEMBLOCK_ERROR || addr + aper_size > GART_MAX_ADDR) { | 91 | if (!addr || addr + aper_size > GART_MAX_ADDR) { |
92 | printk(KERN_ERR | 92 | printk(KERN_ERR |
93 | "Cannot allocate aperture memory hole (%lx,%uK)\n", | 93 | "Cannot allocate aperture memory hole (%lx,%uK)\n", |
94 | addr, aper_size>>10); | 94 | addr, aper_size>>10); |
diff --git a/arch/x86/kernel/check.c b/arch/x86/kernel/check.c index 452932d3473..95680fc4df5 100644 --- a/arch/x86/kernel/check.c +++ b/arch/x86/kernel/check.c | |||
@@ -86,7 +86,7 @@ void __init setup_bios_corruption_check(void) | |||
86 | u64 size; | 86 | u64 size; |
87 | addr = memblock_x86_find_in_range_size(addr, &size, PAGE_SIZE); | 87 | addr = memblock_x86_find_in_range_size(addr, &size, PAGE_SIZE); |
88 | 88 | ||
89 | if (addr == MEMBLOCK_ERROR) | 89 | if (!addr) |
90 | break; | 90 | break; |
91 | 91 | ||
92 | if (addr >= corruption_check_size) | 92 | if (addr >= corruption_check_size) |
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 3e2ef842531..0f9ff58d06d 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -745,7 +745,7 @@ u64 __init early_reserve_e820(u64 startt, u64 sizet, u64 align) | |||
745 | 745 | ||
746 | for (start = startt; ; start += size) { | 746 | for (start = startt; ; start += size) { |
747 | start = memblock_x86_find_in_range_size(start, &size, align); | 747 | start = memblock_x86_find_in_range_size(start, &size, align); |
748 | if (start == MEMBLOCK_ERROR) | 748 | if (!start) |
749 | return 0; | 749 | return 0; |
750 | if (size >= sizet) | 750 | if (size >= sizet) |
751 | break; | 751 | break; |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index afaf38447ef..31ffe20d5d2 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -331,7 +331,7 @@ static void __init relocate_initrd(void) | |||
331 | ramdisk_here = memblock_find_in_range(0, end_of_lowmem, area_size, | 331 | ramdisk_here = memblock_find_in_range(0, end_of_lowmem, area_size, |
332 | PAGE_SIZE); | 332 | PAGE_SIZE); |
333 | 333 | ||
334 | if (ramdisk_here == MEMBLOCK_ERROR) | 334 | if (!ramdisk_here) |
335 | panic("Cannot find place for new RAMDISK of size %lld\n", | 335 | panic("Cannot find place for new RAMDISK of size %lld\n", |
336 | ramdisk_size); | 336 | ramdisk_size); |
337 | 337 | ||
@@ -554,7 +554,7 @@ static void __init reserve_crashkernel(void) | |||
554 | crash_base = memblock_find_in_range(alignment, | 554 | crash_base = memblock_find_in_range(alignment, |
555 | CRASH_KERNEL_ADDR_MAX, crash_size, alignment); | 555 | CRASH_KERNEL_ADDR_MAX, crash_size, alignment); |
556 | 556 | ||
557 | if (crash_base == MEMBLOCK_ERROR) { | 557 | if (!crash_base) { |
558 | pr_info("crashkernel reservation failed - No suitable area found.\n"); | 558 | pr_info("crashkernel reservation failed - No suitable area found.\n"); |
559 | return; | 559 | return; |
560 | } | 560 | } |
diff --git a/arch/x86/kernel/trampoline.c b/arch/x86/kernel/trampoline.c index a91ae7709b4..a1f13ddb06e 100644 --- a/arch/x86/kernel/trampoline.c +++ b/arch/x86/kernel/trampoline.c | |||
@@ -14,7 +14,7 @@ void __init setup_trampolines(void) | |||
14 | 14 | ||
15 | /* Has to be in very low memory so we can execute real-mode AP code. */ | 15 | /* Has to be in very low memory so we can execute real-mode AP code. */ |
16 | mem = memblock_find_in_range(0, 1<<20, size, PAGE_SIZE); | 16 | mem = memblock_find_in_range(0, 1<<20, size, PAGE_SIZE); |
17 | if (mem == MEMBLOCK_ERROR) | 17 | if (!mem) |
18 | panic("Cannot allocate trampoline\n"); | 18 | panic("Cannot allocate trampoline\n"); |
19 | 19 | ||
20 | x86_trampoline_base = __va(mem); | 20 | x86_trampoline_base = __va(mem); |