mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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>
This commit is contained in:
parent
644c12d7f6
commit
8d8f3cbe77
4 changed files with 4 additions and 8 deletions
|
@ -669,8 +669,7 @@ old_gdt:
|
||||||
*/
|
*/
|
||||||
atomic_inc(&init_mm.mm_count);
|
atomic_inc(&init_mm.mm_count);
|
||||||
current->active_mm = &init_mm;
|
current->active_mm = &init_mm;
|
||||||
if (current->mm)
|
BUG_ON(current->mm);
|
||||||
BUG();
|
|
||||||
enter_lazy_tlb(&init_mm, current);
|
enter_lazy_tlb(&init_mm, current);
|
||||||
|
|
||||||
load_esp0(t, thread);
|
load_esp0(t, thread);
|
||||||
|
|
|
@ -498,8 +498,7 @@ void __init efi_enter_virtual_mode(void)
|
||||||
check_range_for_systab(md);
|
check_range_for_systab(md);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!efi.systab)
|
BUG_ON(!efi.systab);
|
||||||
BUG();
|
|
||||||
|
|
||||||
status = phys_efi_set_virtual_address_map(
|
status = phys_efi_set_virtual_address_map(
|
||||||
memmap.desc_size * memmap.nr_map,
|
memmap.desc_size * memmap.nr_map,
|
||||||
|
|
|
@ -153,8 +153,7 @@ static void __init find_max_pfn_node(int nid)
|
||||||
*/
|
*/
|
||||||
if (node_start_pfn[nid] > max_pfn)
|
if (node_start_pfn[nid] > max_pfn)
|
||||||
node_start_pfn[nid] = max_pfn;
|
node_start_pfn[nid] = max_pfn;
|
||||||
if (node_start_pfn[nid] > node_end_pfn[nid])
|
BUG_ON(node_start_pfn[nid] > node_end_pfn[nid]);
|
||||||
BUG();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -569,8 +569,7 @@ void __init mem_init(void)
|
||||||
int bad_ppro;
|
int bad_ppro;
|
||||||
|
|
||||||
#ifdef CONFIG_FLATMEM
|
#ifdef CONFIG_FLATMEM
|
||||||
if (!mem_map)
|
BUG_ON(!mem_map);
|
||||||
BUG();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bad_ppro = ppro_with_ram_bug();
|
bad_ppro = ppro_with_ram_bug();
|
||||||
|
|
Loading…
Reference in a new issue