]> err.no Git - linux-2.6/commitdiff
BUG_ON cleanups in arch/i386
authorEric Sesterhenn <snakebyte@gmx.de>
Tue, 3 Oct 2006 21:34:58 +0000 (23:34 +0200)
committerAdrian Bunk <bunk@stusta.de>
Tue, 3 Oct 2006 21:34:58 +0000 (23:34 +0200)
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>
arch/i386/kernel/cpu/common.c
arch/i386/kernel/efi.c
arch/i386/mm/discontig.c
arch/i386/mm/init.c

index b2f24d57fddd25254eab6f832ffb3304cab80c84..d9f3e3c31f054240c790bbb461c8f261f2726487 100644 (file)
@@ -669,8 +669,7 @@ old_gdt:
         */
        atomic_inc(&init_mm.mm_count);
        current->active_mm = &init_mm;
-       if (current->mm)
-               BUG();
+       BUG_ON(current->mm);
        enter_lazy_tlb(&init_mm, current);
 
        load_esp0(t, thread);
index f9436989473c23fa0f57ac4ddea21dc8a2f117f0..8b40648d0ef00f2570ea2f19e07da3e1f851d41f 100644 (file)
@@ -498,8 +498,7 @@ void __init efi_enter_virtual_mode(void)
                check_range_for_systab(md);
        }
 
-       if (!efi.systab)
-               BUG();
+       BUG_ON(!efi.systab);
 
        status = phys_efi_set_virtual_address_map(
                        memmap.desc_size * memmap.nr_map,
index 51e3739dd22700f13a28a0627163fcc6bfb94bb0..455597db84dffe2d078db1011d21653a8568650c 100644 (file)
@@ -153,8 +153,7 @@ static void __init find_max_pfn_node(int nid)
         */
        if (node_start_pfn[nid] > max_pfn)
                node_start_pfn[nid] = max_pfn;
-       if (node_start_pfn[nid] > node_end_pfn[nid])
-               BUG();
+       BUG_ON(node_start_pfn[nid] > node_end_pfn[nid]);
 }
 
 /* 
index 90089c14c23d8612673fed024e1a59ae23c98090..167416155ee41606007452bc6d14f2b845757326 100644 (file)
@@ -569,8 +569,7 @@ void __init mem_init(void)
        int bad_ppro;
 
 #ifdef CONFIG_FLATMEM
-       if (!mem_map)
-               BUG();
+       BUG_ON(!mem_map);
 #endif
        
        bad_ppro = ppro_with_ram_bug();