Commit 232443e2 authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Adrian Bunk

BUG_ON() Conversion in drivers/video/

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.
Signed-off-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent b7494554
...@@ -327,8 +327,7 @@ static void bw2_init_one(struct sbus_dev *sdev) ...@@ -327,8 +327,7 @@ static void bw2_init_one(struct sbus_dev *sdev)
} else } else
#else #else
{ {
if (!sdev) BUG_ON(!sdev);
BUG();
all->par.physbase = sdev->reg_addrs[0].phys_addr; all->par.physbase = sdev->reg_addrs[0].phys_addr;
resp = &sdev->resource[0]; resp = &sdev->resource[0];
sbusfb_fill_var(&all->info.var, (sdev ? sdev->prom_node : 0), 1); sbusfb_fill_var(&all->info.var, (sdev ? sdev->prom_node : 0), 1);
......
...@@ -466,8 +466,7 @@ static void ffb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) ...@@ -466,8 +466,7 @@ static void ffb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
unsigned long flags; unsigned long flags;
u32 fg; u32 fg;
if (rect->rop != ROP_COPY && rect->rop != ROP_XOR) BUG_ON(rect->rop != ROP_COPY && rect->rop != ROP_XOR);
BUG();
fg = ((u32 *)info->pseudo_palette)[rect->color]; fg = ((u32 *)info->pseudo_palette)[rect->color];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment