Commit 8abd8e298eb15e2c1b993df0634daf29e43e0aab

Authored by Eric Sesterhenn
Committed by Adrian Bunk
1 parent 9bc98fc6fd

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>

Showing 1 changed file with 2 additions and 4 deletions Side-by-side Diff

... ... @@ -360,8 +360,7 @@
360 360 unsigned long cur_index, start_print;
361 361 static int msg_level = -1;
362 362  
363   - if (((long)(start - end)) > 0)
364   - BUG();
  363 + BUG_ON(((long)(start - end)) > 0);
365 364  
366 365 cur_index = start;
367 366 start_print = start;
... ... @@ -708,8 +707,7 @@
708 707 */
709 708 void acquire_console_sem(void)
710 709 {
711   - if (in_interrupt())
712   - BUG();
  710 + BUG_ON(in_interrupt());
713 711 down(&console_sem);
714 712 console_locked = 1;
715 713 console_may_schedule = 1;