BUG_ON() Conversion in sound/sparc/cs4231.c
Subsystems (2)
PATCH 1/1 BUG_ON() Conversion in sound/sparc/cs4231.c
hi,
this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away.
Signed-off-by Eric Sesterhenn <[email protected]>
sound/sparc/cs4231.c renamed from sound/sparc/cs4231.c.orig +2 -4
@@ -610,8 +610,7 @@ static void snd_cs4231_advance_dma(strucunsigned int period_size =snd_pcm_lib_period_bytes (substream);unsigned int offset = period_size * (*periods_sent); -if (period_size >= (1 <<24 )) -BUG (); +BUG_ON (period_size >= (1 <<24 ));if (dma_cont->request (dma_cont, runtime->dma_addr + offset, period_size))return ;
@@ -1078,8 +1077,7 @@ static int snd_cs4231_playback_prepare(s chip->image[CS4231_IFACE_CTRL ] &= ~(CS4231_PLAYBACK_ENABLE |CS4231_PLAYBACK_PIO ); -if (runtime->period_size >0xffff +1 ) -BUG (); +BUG_ON (runtime->period_size >0xffff +1 ); chip->p_periods_sent =0 ;spin_unlock_irqrestore (&chip->lock, flags);
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors