From: Daniel Mack <zonque@gmail.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, clemens@ladisch.de, Daniel Mack <zonque@gmail.com>
Subject: [PATCH 2/8] ALSA: usb-audio: make hwc_debug a noop in case HW_CONST_DEBUG is not set
Date: Wed, 18 May 2011 11:28:39 +0200 [thread overview]
Message-ID: <1305710925-3857-3-git-send-email-zonque@gmail.com> (raw)
In-Reply-To: <1305710925-3857-1-git-send-email-zonque@gmail.com>
Just defining it to nothing is dangerous as it can alter the code
execution flow, for example when used in as only function in a
conditional code block.
Signed-off-by: Daniel Mack <zonque@gmail.com>
---
sound/usb/debug.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/usb/debug.h b/sound/usb/debug.h
index 343ec2d..5803017 100644
--- a/sound/usb/debug.h
+++ b/sound/usb/debug.h
@@ -8,7 +8,7 @@
#ifdef HW_CONST_DEBUG
#define hwc_debug(fmt, args...) printk(KERN_DEBUG fmt, ##args)
#else
-#define hwc_debug(fmt, args...) /**/
+#define hwc_debug(fmt, args...) do { } while(0)
#endif
#endif /* __USBAUDIO_DEBUG_H */
--
1.7.5.1
next prev parent reply other threads:[~2011-05-18 9:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-18 9:28 Assorted usb-audio patches Daniel Mack
2011-05-18 9:28 ` [PATCH 1/8] MAINTAINERS: Add entry for Native Instruments sound driver Daniel Mack
2011-05-18 9:28 ` Daniel Mack [this message]
2011-05-18 9:28 ` [PATCH 3/8] ALSA: usb-audio: include format.h in format.c Daniel Mack
2011-05-18 9:28 ` [PATCH 4/8] ALSA: usb-audio: remove invalid extra mixers for Komplete Audio 6 Daniel Mack
2011-05-18 9:28 ` [PATCH 5/8] ALSA: usb-audio: Add quirk for KORG PANDORA PX5D MIDI interface Daniel Mack
2011-05-18 9:28 ` [PATCH 6/8] ALSA: usb-audio: add quirks for Roland GR-55 Daniel Mack
2011-05-18 9:28 ` [PATCH 7/8] ALSA: usb-audio: assume valid clock Daniel Mack
2011-05-18 9:28 ` [PATCH 8/8] ALSA: usb-audio: handle "Fast Track Ultra" with USB_DEVICE_VENDOR_SPEC() Daniel Mack
2011-05-18 9:45 ` Assorted usb-audio patches Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1305710925-3857-3-git-send-email-zonque@gmail.com \
--to=zonque@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.