diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-12-25 13:40:26 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-12-25 13:40:26 +0300 |
commit | 86b3aa390b4b9925f16a21b98441fd7abdb9fff2 (patch) | |
tree | 9eb9d429a88d2301667198e30842502556b715f2 /include | |
parent | e4456e71618ec2c98084c15824d93e997955b60c (diff) | |
parent | ebef7cfc81942686a994ca6239b195040f5d1e4d (diff) | |
download | linux-86b3aa390b4b9925f16a21b98441fd7abdb9fff2.tar.xz |
Merge branch 'topic/ca0106' into to-push
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/core.h | 28 | ||||
-rw-r--r-- | include/sound/version.h | 2 |
2 files changed, 26 insertions, 4 deletions
diff --git a/include/sound/core.h b/include/sound/core.h index 1508c4ec1ba9..f632484bc743 100644 --- a/include/sound/core.h +++ b/include/sound/core.h @@ -353,7 +353,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...) \ @@ -380,18 +380,40 @@ 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 */ #define snd_printd(fmt, args...) do { } while (0) #define snd_BUG() do { } while (0) -static inline int __snd_bug_on(void) +static inline int __snd_bug_on(int cond) { return 0; } -#define snd_BUG_ON(cond) __snd_bug_on() /* always false */ +#define snd_BUG_ON(cond) __snd_bug_on(0 && (cond)) /* always false */ #endif /* CONFIG_SND_DEBUG */ diff --git a/include/sound/version.h b/include/sound/version.h index 4aafeda88634..2b48237e23bf 100644 --- a/include/sound/version.h +++ b/include/sound/version.h @@ -1,3 +1,3 @@ /* include/version.h */ -#define CONFIG_SND_VERSION "1.0.18rc3" +#define CONFIG_SND_VERSION "1.0.18a" #define CONFIG_SND_DATE "" |