Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120349
b: refs/heads/master
c: f66fced
h: refs/heads/master
i:
  120347: 1ae7c9d
v: v3
  • Loading branch information
Takashi Iwai committed Nov 7, 2008
1 parent ccf0808 commit a71ad7f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 945eed02cd619f525e097319cd3d18c58d01da87
refs/heads/master: f66fcedc84dd06d42a0dba3894d238498509e8b7
24 changes: 23 additions & 1 deletion trunk/include/sound/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
* snd_printk - printk wrapper
* @fmt: format string
*
* Works like print() but prints the file and the line of the caller
* Works like printk() but prints the file and the line of the caller
* when configured with CONFIG_SND_VERBOSE_PRINTK.
*/
#define snd_printk(fmt, args...) \
Expand All @@ -383,7 +383,29 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
printk(fmt ,##args)
#endif

/**
* snd_BUG - give a BUG warning message and stack trace
*
* Calls WARN() if CONFIG_SND_DEBUG is set.
* Ignored when CONFIG_SND_DEBUG is not set.
*/
#define snd_BUG() WARN(1, "BUG?\n")

/**
* snd_BUG_ON - debugging check macro
* @cond: condition to evaluate
*
* When CONFIG_SND_DEBUG is set, this macro evaluates the given condition,
* and call WARN() and returns the value if it's non-zero.
*
* When CONFIG_SND_DEBUG is not set, this just returns zero, and the given
* condition is ignored.
*
* NOTE: the argument won't be evaluated at all when CONFIG_SND_DEBUG=n.
* Thus, don't put any statement that influences on the code behavior,
* such as pre/post increment, to the argument of this macro.
* If you want to evaluate and give a warning, use standard WARN_ON().
*/
#define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond))

#else /* !CONFIG_SND_DEBUG */
Expand Down

0 comments on commit a71ad7f

Please sign in to comment.