From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-trivial@nongnu.org, peter maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH v2] add macro file for coccinelle
Date: Tue, 8 Sep 2015 08:44:53 -0400 (EDT) [thread overview]
Message-ID: <1829681137.27366603.1441716293187.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <87h9n5p3ou.fsf@blackfin.pond.sub.org>
> > +/* From qemu/compiler.h */
> > +#define QEMU_GNUC_PREREQ(maj, min) 1
> > +#define QEMU_NORETURN __attribute__ ((__noreturn__))
> > +#define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
> > +#define QEMU_SENTINEL __attribute__((sentinel))
> > +#define QEMU_ARTIFICIAL __attribute__((always_inline, artificial))
> > +#define QEMU_PACKED __attribute__((gcc_struct, packed))
> > +
> > +#define cat(x,y) x ## y
> > +#define cat2(x,y) cat(x,y)
>
> Why not reuse glue()?
Because the duplication is already in compiler.h, which should
use glue() instead of cat2(). Separate patch IMHO, but thanks
for noticing. :-)
Paolo
> > +#define QEMU_BUILD_BUG_ON(x) \
> > + typedef char cat2(qemu_build_bug_on__,__LINE__)[(x)?-1:1]
> > __attribute__((unused));
> > +
> > +#define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
> > +
> > +#define xglue(x, y) x ## y
> > +#define glue(x, y) xglue(x, y)
> > +#define stringify(s) tostring(s)
> > +#define tostring(s) #s
> > +
> > +#define typeof_field(type, field) typeof(((type *)0)->field)
> > +#define type_check(t1,t2) ((t1*)0 - (t2*)0)
> > +
> [...]
>
> Preferably with cat2() replaced by glue():
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-trivial@nongnu.org, peter maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] add macro file for coccinelle
Date: Tue, 8 Sep 2015 08:44:53 -0400 (EDT) [thread overview]
Message-ID: <1829681137.27366603.1441716293187.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <87h9n5p3ou.fsf@blackfin.pond.sub.org>
> > +/* From qemu/compiler.h */
> > +#define QEMU_GNUC_PREREQ(maj, min) 1
> > +#define QEMU_NORETURN __attribute__ ((__noreturn__))
> > +#define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
> > +#define QEMU_SENTINEL __attribute__((sentinel))
> > +#define QEMU_ARTIFICIAL __attribute__((always_inline, artificial))
> > +#define QEMU_PACKED __attribute__((gcc_struct, packed))
> > +
> > +#define cat(x,y) x ## y
> > +#define cat2(x,y) cat(x,y)
>
> Why not reuse glue()?
Because the duplication is already in compiler.h, which should
use glue() instead of cat2(). Separate patch IMHO, but thanks
for noticing. :-)
Paolo
> > +#define QEMU_BUILD_BUG_ON(x) \
> > + typedef char cat2(qemu_build_bug_on__,__LINE__)[(x)?-1:1]
> > __attribute__((unused));
> > +
> > +#define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
> > +
> > +#define xglue(x, y) x ## y
> > +#define glue(x, y) xglue(x, y)
> > +#define stringify(s) tostring(s)
> > +#define tostring(s) #s
> > +
> > +#define typeof_field(type, field) typeof(((type *)0)->field)
> > +#define type_check(t1,t2) ((t1*)0 - (t2*)0)
> > +
> [...]
>
> Preferably with cat2() replaced by glue():
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
next prev parent reply other threads:[~2015-09-08 12:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-07 10:21 [Qemu-trivial] [PATCH v2] add macro file for coccinelle Paolo Bonzini
2015-09-07 10:21 ` [Qemu-devel] " Paolo Bonzini
2015-09-08 11:10 ` [Qemu-trivial] " Markus Armbruster
2015-09-08 11:10 ` Markus Armbruster
2015-09-08 12:44 ` Paolo Bonzini [this message]
2015-09-08 12:44 ` Paolo Bonzini
2015-09-08 13:08 ` [Qemu-trivial] " Markus Armbruster
2015-09-08 13:08 ` Markus Armbruster
2015-09-08 13:31 ` [Qemu-trivial] " Marcel Apfelbaum
2015-09-08 13:31 ` [Qemu-devel] [Qemu-trivial] " Marcel Apfelbaum
2015-09-08 17:30 ` [Qemu-trivial] [Qemu-devel] " John Snow
2015-09-08 17:30 ` John Snow
2015-09-08 18:35 ` [Qemu-trivial] " Markus Armbruster
2015-09-08 18:35 ` Markus Armbruster
2015-09-09 9:51 ` [Qemu-trivial] " Paolo Bonzini
2015-09-09 9:51 ` Paolo Bonzini
2015-09-10 21:23 ` [Qemu-trivial] " John Snow
2015-09-10 21:23 ` John Snow
2015-09-15 17:55 ` [Qemu-trivial] " Michael Tokarev
2015-09-15 17:55 ` [Qemu-devel] " Michael Tokarev
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=1829681137.27366603.1441716293187.JavaMail.zimbra@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.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 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.