mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
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>
This commit is contained in:
committed by
Adrian Bunk
parent
36ddf5bbde
commit
373ebfbf17
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user