From: Kyle Moffett <kyle@moffetthome.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: David Woodhouse <dwmw2@infradead.org>,
Ingo Molnar <mingo@elte.hu>,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] intel-iommu: fix build with CONFIG_BRANCH_TRACER=y
Date: Tue, 7 Apr 2009 18:42:17 -0400 [thread overview]
Message-ID: <f73f7ab80904071542r1d3e5e1au21c8c4ded9d36f7d@mail.gmail.com> (raw)
In-Reply-To: <f73f7ab80904071540w3d298c3bh386b46d5685f746e@mail.gmail.com>
Whoops, resent the original HTML email as plain text, sorry...
On Tue, Apr 7, 2009 at 10:59 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Tue, 7 Apr 2009, Linus Torvalds wrote:
> >
> > Can we please do it something like the following instead:
> >
> > #define if(a, ...) \
> > __trace_if( (a, ## __VA_ARGS__) )
> >
> > so that you don't need to do that ", ## __VA_ARGS__" thing three times?
>
> IOW, does this (TOTALLY UNTESTED) patch work?
>
> Linus
>
> -#define if(cond) if (__builtin_constant_p((cond)) ? !!(cond) : \
> +#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
> +#define __trace_if(cond) \
> + if (__builtin_constant_p((cond)) ? !!(cond) : \
Umm, why not just use the much nicer pre-C99 GCC syntax? It
automatically makes "cond" expand into the full comma-separated
argument list. No other changes should be necessary. IOW, something
like this:
-#define if(cond) if (__builtin_constant_p((cond)) ? !!(cond) : \
+#define if(cond...) if (__builtin_constant_p((cond)) ? !!(cond) : \
Cheers,
Kyle Moffett
next prev parent reply other threads:[~2009-04-07 22:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1238839639.3560.37.camel@macbook.infradead.org>
2009-04-07 5:37 ` [GIT *] intel-iommu updates for 2.6.30 (second batch) Ingo Molnar
2009-04-07 5:42 ` Ingo Molnar
2009-04-07 5:52 ` David Woodhouse
2009-04-07 5:44 ` David Woodhouse
2009-04-07 5:48 ` Ingo Molnar
2009-04-07 5:52 ` Ingo Molnar
2009-04-07 6:04 ` David Woodhouse
2009-04-07 6:15 ` Ingo Molnar
2009-04-07 6:18 ` David Woodhouse
2009-04-07 8:49 ` Ingo Molnar
2009-04-07 9:02 ` [PATCH] intel-iommu: fix build with CONFIG_BRANCH_TRACER=y Ingo Molnar
2009-04-07 11:33 ` David Woodhouse
2009-04-07 12:14 ` Ingo Molnar
2009-04-07 12:44 ` David Woodhouse
2009-04-07 12:57 ` Ingo Molnar
2009-04-07 13:14 ` David Woodhouse
2009-04-07 14:54 ` Linus Torvalds
2009-04-07 14:59 ` Linus Torvalds
2009-04-07 15:12 ` Ingo Molnar
[not found] ` <f73f7ab80904071540w3d298c3bh386b46d5685f746e@mail.gmail.com>
2009-04-07 22:42 ` Kyle Moffett [this message]
2009-04-07 14:50 ` Linus Torvalds
2009-04-07 6:39 ` [GIT *] intel-iommu updates for 2.6.30 (second batch) Ingo Molnar
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=f73f7ab80904071542r1d3e5e1au21c8c4ded9d36f7d@mail.gmail.com \
--to=kyle@moffetthome.net \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®