diff options
| author | Takashi Iwai <tiwai@suse.de> | 2008-12-25 05:40:26 -0500 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2008-12-25 05:40:26 -0500 |
| commit | 86b3aa390b4b9925f16a21b98441fd7abdb9fff2 (patch) | |
| tree | 9eb9d429a88d2301667198e30842502556b715f2 /include | |
| parent | e4456e71618ec2c98084c15824d93e997955b60c (diff) | |
| parent | ebef7cfc81942686a994ca6239b195040f5d1e4d (diff) | |
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, ...) | |||
| 353 | * snd_printk - printk wrapper | 353 | * snd_printk - printk wrapper |
| 354 | * @fmt: format string | 354 | * @fmt: format string |
| 355 | * | 355 | * |
| 356 | * Works like print() but prints the file and the line of the caller | 356 | * Works like printk() but prints the file and the line of the caller |
| 357 | * when configured with CONFIG_SND_VERBOSE_PRINTK. | 357 | * when configured with CONFIG_SND_VERBOSE_PRINTK. |
| 358 | */ | 358 | */ |
| 359 | #define snd_printk(fmt, args...) \ | 359 | #define snd_printk(fmt, args...) \ |
| @@ -380,18 +380,40 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
| 380 | printk(fmt ,##args) | 380 | printk(fmt ,##args) |
| 381 | #endif | 381 | #endif |
| 382 | 382 | ||
| 383 | /** | ||
| 384 | * snd_BUG - give a BUG warning message and stack trace | ||
| 385 | * | ||
| 386 | * Calls WARN() if CONFIG_SND_DEBUG is set. | ||
| 387 | * Ignored when CONFIG_SND_DEBUG is not set. | ||
| 388 | */ | ||
| 383 | #define snd_BUG() WARN(1, "BUG?\n") | 389 | #define snd_BUG() WARN(1, "BUG?\n") |
| 390 | |||
| 391 | /** | ||
| 392 | * snd_BUG_ON - debugging check macro | ||
| 393 | * @cond: condition to evaluate | ||
| 394 | * | ||
| 395 | * When CONFIG_SND_DEBUG is set, this macro evaluates the given condition, | ||
| 396 | * and call WARN() and returns the value if it's non-zero. | ||
| 397 | * | ||
| 398 | * When CONFIG_SND_DEBUG is not set, this just returns zero, and the given | ||
| 399 | * condition is ignored. | ||
| 400 | * | ||
| 401 | * NOTE: the argument won't be evaluated at all when CONFIG_SND_DEBUG=n. | ||
| 402 | * Thus, don't put any statement that influences on the code behavior, | ||
| 403 | * such as pre/post increment, to the argument of this macro. | ||
| 404 | * If you want to evaluate and give a warning, use standard WARN_ON(). | ||
| 405 | */ | ||
| 384 | #define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond)) | 406 | #define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond)) |
| 385 | 407 | ||
| 386 | #else /* !CONFIG_SND_DEBUG */ | 408 | #else /* !CONFIG_SND_DEBUG */ |
| 387 | 409 | ||
| 388 | #define snd_printd(fmt, args...) do { } while (0) | 410 | #define snd_printd(fmt, args...) do { } while (0) |
| 389 | #define snd_BUG() do { } while (0) | 411 | #define snd_BUG() do { } while (0) |
| 390 | static inline int __snd_bug_on(void) | 412 | static inline int __snd_bug_on(int cond) |
| 391 | { | 413 | { |
| 392 | return 0; | 414 | return 0; |
| 393 | } | 415 | } |
| 394 | #define snd_BUG_ON(cond) __snd_bug_on() /* always false */ | 416 | #define snd_BUG_ON(cond) __snd_bug_on(0 && (cond)) /* always false */ |
| 395 | 417 | ||
| 396 | #endif /* CONFIG_SND_DEBUG */ | 418 | #endif /* CONFIG_SND_DEBUG */ |
| 397 | 419 | ||
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 @@ | |||
| 1 | /* include/version.h */ | 1 | /* include/version.h */ |
| 2 | #define CONFIG_SND_VERSION "1.0.18rc3" | 2 | #define CONFIG_SND_VERSION "1.0.18a" |
| 3 | #define CONFIG_SND_DATE "" | 3 | #define CONFIG_SND_DATE "" |
