diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-04-01 01:21:17 +0200 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-04-01 01:21:17 +0200 |
commit | 8abd8e298eb15e2c1b993df0634daf29e43e0aab (patch) | |
tree | a83df11829c6ffdee4a787b57f899f87813a6fb1 /kernel/printk.c | |
parent | 9bc98fc6fd3d07f37b597601489df200e0024222 (diff) | |
download | kernel_samsung_tuna-8abd8e298eb15e2c1b993df0634daf29e43e0aab.zip kernel_samsung_tuna-8abd8e298eb15e2c1b993df0634daf29e43e0aab.tar.gz kernel_samsung_tuna-8abd8e298eb15e2c1b993df0634daf29e43e0aab.tar.bz2 |
BUG_ON() Conversion in kernel/printk.c
this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index 8cc1943..c056f33 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -360,8 +360,7 @@ static void call_console_drivers(unsigned long start, unsigned long end) unsigned long cur_index, start_print; static int msg_level = -1; - if (((long)(start - end)) > 0) - BUG(); + BUG_ON(((long)(start - end)) > 0); cur_index = start; start_print = start; @@ -708,8 +707,7 @@ int __init add_preferred_console(char *name, int idx, char *options) */ void acquire_console_sem(void) { - if (in_interrupt()) - BUG(); + BUG_ON(in_interrupt()); down(&console_sem); console_locked = 1; console_may_schedule = 1; |