From d5702162f85526319c848c667df49ee1754dccef Mon Sep 17 00:00:00 2001 From: Christine Spang Date: Mon, 4 Mar 2013 17:02:59 -0500 Subject: ALSA: Make snd_BUG_ON() always evaluate and return the conditional expression Having snd_BUG_ON() only evaluate its conditional when CONFIG_SND_DEBUG is set leads to frequent bugs, since other similar macros in the kernel have different behavior. Let's make snd_BUG_ON() act like those macros so it will stop being accidentally misused. Signed-off-by: Christine Spang Signed-off-by: Takashi Iwai --- Documentation/DocBook/writing-an-alsa-driver.tmpl | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Documentation/DocBook') diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl index bd6fee22c4dd..06741e925985 100644 --- a/Documentation/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl @@ -6164,14 +6164,12 @@ struct _snd_pcm_runtime { The macro takes an conditional expression to evaluate. - When CONFIG_SND_DEBUG, is set, the - expression is actually evaluated. If it's non-zero, it shows - the warning message such as + When CONFIG_SND_DEBUG, is set, if the + expression is non-zero, it shows the warning message such as BUG? (xxx) - normally followed by stack trace. It returns the evaluated - value. - When no CONFIG_SND_DEBUG is set, this - macro always returns zero. + normally followed by stack trace. + + In both cases it returns the evaluated value. -- cgit v1.2.3