aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-10-03 17:34:58 -0400
committerAdrian Bunk <bunk@stusta.de>2006-10-03 17:34:58 -0400
commit8d8f3cbe777e014123bfa63f2cebd6eb29032225 (patch)
tree5ca6abfa5e696d3c792050221c4f7326d676d23f /arch/i386
parent644c12d7f695c0a30662ac781b0f06f79d7f9bab (diff)
BUG_ON cleanups in arch/i386
This changes a couple of if() BUG(); constructs to BUG_ON(); so it can be safely optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/kernel/cpu/common.c3
-rw-r--r--arch/i386/kernel/efi.c3
-rw-r--r--arch/i386/mm/discontig.c3
-rw-r--r--arch/i386/mm/init.c3
4 files changed, 4 insertions, 8 deletions
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c
index b2f24d57fddd..d9f3e3c31f05 100644
--- a/arch/i386/kernel/cpu/common.c
+++ b/arch/i386/kernel/cpu/common.c
@@ -669,8 +669,7 @@ old_gdt:
669 */ 669 */
670 atomic_inc(&init_mm.mm_count); 670 atomic_inc(&init_mm.mm_count);
671 current->active_mm = &init_mm; 671 current->active_mm = &init_mm;
672 if (current->mm) 672 BUG_ON(current->mm);
673 BUG();
674 enter_lazy_tlb(&init_mm, current); 673 enter_lazy_tlb(&init_mm, current);
675 674
676 load_esp0(t, thread); 675 load_esp0(t, thread);
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c
index f9436989473c..8b40648d0ef0 100644
--- a/arch/i386/kernel/efi.c
+++ b/arch/i386/kernel/efi.c
@@ -498,8 +498,7 @@ void __init efi_enter_virtual_mode(void)
498 check_range_for_systab(md); 498 check_range_for_systab(md);
499 } 499 }
500 500
501 if (!efi.systab) 501 BUG_ON(!efi.systab);
502 BUG();
503 502
504 status = phys_efi_set_virtual_address_map( 503 status = phys_efi_set_virtual_address_map(
505 memmap.desc_size * memmap.nr_map, 504 memmap.desc_size * memmap.nr_map,
diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c
index 51e3739dd227..455597db84df 100644
--- a/arch/i386/mm/discontig.c
+++ b/arch/i386/mm/discontig.c
@@ -153,8 +153,7 @@ static void __init find_max_pfn_node(int nid)
153 */ 153 */
154 if (node_start_pfn[nid] > max_pfn) 154 if (node_start_pfn[nid] > max_pfn)
155 node_start_pfn[nid] = max_pfn; 155 node_start_pfn[nid] = max_pfn;
156 if (node_start_pfn[nid] > node_end_pfn[nid]) 156 BUG_ON(node_start_pfn[nid] > node_end_pfn[nid]);
157 BUG();
158} 157}
159 158
160/* 159/*
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c
index 90089c14c23d..167416155ee4 100644
--- a/arch/i386/mm/init.c
+++ b/arch/i386/mm/init.c
@@ -569,8 +569,7 @@ void __init mem_init(void)
569 int bad_ppro; 569 int bad_ppro;
570 570
571#ifdef CONFIG_FLATMEM 571#ifdef CONFIG_FLATMEM
572 if (!mem_map) 572 BUG_ON(!mem_map);
573 BUG();
574#endif 573#endif
575 574
576 bad_ppro = ppro_with_ram_bug(); 575 bad_ppro = ppro_with_ram_bug();