core.h (945eed02cd619f525e097319cd3d18c58d01da87) core.h (f66fcedc84dd06d42a0dba3894d238498509e8b7)
1#ifndef __SOUND_CORE_H
2#define __SOUND_CORE_H
3
4/*
5 * Main header file for the ALSA driver
6 * Copyright (c) 1994-2001 by Jaroslav Kysela <perex@perex.cz>
7 *
8 *

--- 342 unchanged lines hidden (view full) ---

351
352/* --- */
353
354#ifdef CONFIG_SND_VERBOSE_PRINTK
355/**
356 * snd_printk - printk wrapper
357 * @fmt: format string
358 *
1#ifndef __SOUND_CORE_H
2#define __SOUND_CORE_H
3
4/*
5 * Main header file for the ALSA driver
6 * Copyright (c) 1994-2001 by Jaroslav Kysela <perex@perex.cz>
7 *
8 *

--- 342 unchanged lines hidden (view full) ---

351
352/* --- */
353
354#ifdef CONFIG_SND_VERBOSE_PRINTK
355/**
356 * snd_printk - printk wrapper
357 * @fmt: format string
358 *
359 * Works like print() but prints the file and the line of the caller
359 * Works like printk() but prints the file and the line of the caller
360 * when configured with CONFIG_SND_VERBOSE_PRINTK.
361 */
362#define snd_printk(fmt, args...) \
363 snd_verbose_printk(__FILE__, __LINE__, fmt ,##args)
364#else
365#define snd_printk(fmt, args...) \
366 printk(fmt ,##args)
367#endif

--- 10 unchanged lines hidden (view full) ---

378 */
379#define snd_printd(fmt, args...) \
380 snd_verbose_printd(__FILE__, __LINE__, fmt ,##args)
381#else
382#define snd_printd(fmt, args...) \
383 printk(fmt ,##args)
384#endif
385
360 * when configured with CONFIG_SND_VERBOSE_PRINTK.
361 */
362#define snd_printk(fmt, args...) \
363 snd_verbose_printk(__FILE__, __LINE__, fmt ,##args)
364#else
365#define snd_printk(fmt, args...) \
366 printk(fmt ,##args)
367#endif

--- 10 unchanged lines hidden (view full) ---

378 */
379#define snd_printd(fmt, args...) \
380 snd_verbose_printd(__FILE__, __LINE__, fmt ,##args)
381#else
382#define snd_printd(fmt, args...) \
383 printk(fmt ,##args)
384#endif
385
386/**
387 * snd_BUG - give a BUG warning message and stack trace
388 *
389 * Calls WARN() if CONFIG_SND_DEBUG is set.
390 * Ignored when CONFIG_SND_DEBUG is not set.
391 */
386#define snd_BUG() WARN(1, "BUG?\n")
392#define snd_BUG() WARN(1, "BUG?\n")
393
394/**
395 * snd_BUG_ON - debugging check macro
396 * @cond: condition to evaluate
397 *
398 * When CONFIG_SND_DEBUG is set, this macro evaluates the given condition,
399 * and call WARN() and returns the value if it's non-zero.
400 *
401 * When CONFIG_SND_DEBUG is not set, this just returns zero, and the given
402 * condition is ignored.
403 *
404 * NOTE: the argument won't be evaluated at all when CONFIG_SND_DEBUG=n.
405 * Thus, don't put any statement that influences on the code behavior,
406 * such as pre/post increment, to the argument of this macro.
407 * If you want to evaluate and give a warning, use standard WARN_ON().
408 */
387#define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond))
388
389#else /* !CONFIG_SND_DEBUG */
390
391#define snd_printd(fmt, args...) do { } while (0)
392#define snd_BUG() do { } while (0)
393static inline int __snd_bug_on(int cond)
394{

--- 57 unchanged lines hidden ---
409#define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond))
410
411#else /* !CONFIG_SND_DEBUG */
412
413#define snd_printd(fmt, args...) do { } while (0)
414#define snd_BUG() do { } while (0)
415static inline int __snd_bug_on(int cond)
416{

--- 57 unchanged lines hidden ---