From: Takashi Iwai <tiwai@suse.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Jaroslav Kysela <perex@perex.cz>,
Steven Rostedt <srostedt@redhat.com>
Subject: Re: [PATCH 4/5] sound: update snd_assert macro
Date: Fri, 03 Oct 2008 11:10:09 +0200 [thread overview]
Message-ID: <s5hbpy2rqmm.wl%tiwai@suse.de> (raw)
In-Reply-To: <20081002151104.821728138@goodmis.org>
At Thu, 02 Oct 2008 11:05:33 -0400,
Steven Rostedt wrote:
>
> One user of the snd_assert macro calls a goto and the compiler
> complains that the label is not used when the snd_assert is
> not set.
>
> This patch makes snd_assert more robust when not defined to
> let the compiler know about arguments when not in use.
This issue was already fixed differently in the recent ALSA tree
(thus in linux-next tree as well).
thanks,
Takashi
>
> CC: Jaroslav Kysela <perex@perex.cz>
> Signed-off-by: Steven Rostedt <srostedt@redhat.com>
> ---
> include/sound/core.h | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> Index: linux-compile.git/include/sound/core.h
> ===================================================================
> --- linux-compile.git.orig/include/sound/core.h 2008-07-27 09:26:33.000000000 -0400
> +++ linux-compile.git/include/sound/core.h 2008-10-02 10:00:57.000000000 -0400
> @@ -407,7 +407,13 @@ void snd_verbose_printd(const char *file
> #else /* !CONFIG_SND_DEBUG */
>
> #define snd_printd(fmt, args...) /* nothing */
> -#define snd_assert(expr, args...) (void)(expr)
> +/* Keep the compiler happy by showing the expr and args */
> +#define snd_assert(expr, args...) do { \
> + if (0) { \
> + (void)(expr); \
> + args; \
> + } \
> +} while(0)
> #define snd_BUG() /* nothing */
>
> #endif /* CONFIG_SND_DEBUG */
>
> --
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
next prev parent reply other threads:[~2008-10-03 9:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-02 15:05 [PATCH 0/5] Clean up patches Steven Rostedt
2008-10-02 15:05 ` [PATCH 1/5] xen: clean up label Steven Rostedt
2008-10-02 15:05 ` [PATCH 2/5] xen: remove unused function warnings Steven Rostedt
2008-10-02 15:05 ` [PATCH 3/5] xen: nuke dead code in enlighten.c Steven Rostedt
2008-10-02 15:05 ` [PATCH 4/5] sound: update snd_assert macro Steven Rostedt
2008-10-03 9:10 ` Takashi Iwai [this message]
2008-10-03 14:24 ` Steven Rostedt
2008-10-02 15:05 ` [PATCH 5/5] xen: nuke the ballon files Steven Rostedt
2008-10-02 15:34 ` Jeremy Fitzhardinge
2008-10-02 17:59 ` Steven Rostedt
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=s5hbpy2rqmm.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=rostedt@goodmis.org \
--cc=srostedt@redhat.com \
/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.