BUG_ON() Conversion in drivers/video/
authorEric Sesterhenn <snakebyte@gmx.de>
Fri, 24 Mar 2006 17:53:18 +0000 (18:53 +0100)
committerAdrian Bunk <bunk@stusta.de>
Fri, 24 Mar 2006 17:53:18 +0000 (18:53 +0100)
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>
drivers/video/bw2.c
drivers/video/ffb.c

index c029db4646f6b8e1834aec1ad174b46ae0bc3bd2..6577fdfdfc16ac2050874318dcabc03922ef8a20 100644 (file)
@@ -327,8 +327,7 @@ static void bw2_init_one(struct sbus_dev *sdev)
        } else
 #else
        {
-               if (!sdev)
-                       BUG();
+               BUG_ON(!sdev);
                all->par.physbase = sdev->reg_addrs[0].phys_addr;
                resp = &sdev->resource[0];
                sbusfb_fill_var(&all->info.var, (sdev ? sdev->prom_node : 0), 1);
index 9c9b21d469a1e7c76c1f3eac8ffb4ae9e4b6d6bd..7633e41adda158a38688c056057fd15c91bf974d 100644 (file)
@@ -466,8 +466,7 @@ static void ffb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
        unsigned long flags;
        u32 fg;
 
-       if (rect->rop != ROP_COPY && rect->rop != ROP_XOR)
-               BUG();
+       BUG_ON(rect->rop != ROP_COPY && rect->rop != ROP_XOR);
 
        fg = ((u32 *)info->pseudo_palette)[rect->color];