aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook/writing-an-alsa-driver.tmpl
diff options
context:
space:
mode:
authorChristine Spang <christine.spang@oracle.com>2013-03-04 17:02:59 -0500
committerTakashi Iwai <tiwai@suse.de>2013-03-11 04:33:34 -0400
commitd5702162f85526319c848c667df49ee1754dccef (patch)
tree15285b7b5a202a7f5629080fc3224a358378d0f1 /Documentation/DocBook/writing-an-alsa-driver.tmpl
parent8ba955cef30921417dffba901a8af5a2662a1dec (diff)
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 <christine.spang@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'Documentation/DocBook/writing-an-alsa-driver.tmpl')
-rw-r--r--Documentation/DocBook/writing-an-alsa-driver.tmpl12
1 files changed, 5 insertions, 7 deletions
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 {
6164 6164
6165 <para> 6165 <para>
6166 The macro takes an conditional expression to evaluate. 6166 The macro takes an conditional expression to evaluate.
6167 When <constant>CONFIG_SND_DEBUG</constant>, is set, the 6167 When <constant>CONFIG_SND_DEBUG</constant>, is set, if the
6168 expression is actually evaluated. If it's non-zero, it shows 6168 expression is non-zero, it shows the warning message such as
6169 the warning message such as
6170 <computeroutput>BUG? (xxx)</computeroutput> 6169 <computeroutput>BUG? (xxx)</computeroutput>
6171 normally followed by stack trace. It returns the evaluated 6170 normally followed by stack trace.
6172 value. 6171
6173 When no <constant>CONFIG_SND_DEBUG</constant> is set, this 6172 In both cases it returns the evaluated value.
6174 macro always returns zero.
6175 </para> 6173 </para>
6176 6174
6177 </section> 6175 </section>