diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-26 18:15:12 +0200 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-03-26 18:15:12 +0200 |
commit | 373ebfbf17a8ecad304f65cb92c4d2d10adc0a19 (patch) | |
tree | b2cc0bd4a1f26f38515476f436d532926b331a85 /drivers/mtd/maps/dilnetpc.c | |
parent | 36ddf5bbdea7ba4582abc62f106f0f0e9f0b6b91 (diff) | |
download | linux-stable-373ebfbf17a8ecad304f65cb92c4d2d10adc0a19.tar.gz linux-stable-373ebfbf17a8ecad304f65cb92c4d2d10adc0a19.tar.bz2 linux-stable-373ebfbf17a8ecad304f65cb92c4d2d10adc0a19.zip |
BUG_ON() Conversion in drivers/mtd/
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 'drivers/mtd/maps/dilnetpc.c')
-rw-r--r-- | drivers/mtd/maps/dilnetpc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/maps/dilnetpc.c b/drivers/mtd/maps/dilnetpc.c index b51c757817d8..efb221692641 100644 --- a/drivers/mtd/maps/dilnetpc.c +++ b/drivers/mtd/maps/dilnetpc.c @@ -218,8 +218,8 @@ static void dnp_set_vpp(struct map_info *not_used, int on) { if(--vpp_counter == 0) setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x4); - else if(vpp_counter < 0) - BUG(); + else + BUG_ON(vpp_counter < 0); } spin_unlock_irq(&dnpc_spin); } @@ -240,8 +240,8 @@ static void adnp_set_vpp(struct map_info *not_used, int on) { if(--vpp_counter == 0) setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x8); - else if(vpp_counter < 0) - BUG(); + else + BUG_ON(vpp_counter < 0); } spin_unlock_irq(&dnpc_spin); } |