qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org, Gerd Hoffman <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] Introduce macro for defining qdev properties
Date: Fri, 17 Jul 2009 18:33:32 +0100	[thread overview]
Message-ID: <200907171833.34167.paul@codesourcery.com> (raw)
In-Reply-To: <f43fc5580907171023n5b15e51epafa2ce7d068f6c2e@mail.gmail.com>

On Friday 17 July 2009, Blue Swirl wrote:
> On Fri, Jul 17, 2009 at 5:41 PM, Anthony Liguori<aliguori@us.ibm.com> wrote:
> > This patch introduces macros for defining qdev properties.  The default
> > macro is clever enough to infer the type of the structure field and to
> > automatically generate a name for the property.  Additional macros are
> > provided that allow infered values to be overridden along with a set of
> > macros to define properties with default values.
>
> Maybe for sake of non-GCC compatibility we should use less clever but
> compatible macros, like
> QDEV_PROP_NAME_DEFVAL_I32
> QDEV_PROP_NAME_DEFVAL_I64
> QDEV_PROP_NAME_DEFVAL_PTR
> QDEV_PROP_NAME_DEFVAL_CHRDEV
> etc?

I think I agree. Using GCC extensions for error checking (e.g. DO_UPCAST) or 
performance (__builtin_clz) is fine, but I'm a reluctant to rely on it for 
correct operation.

Paul

  parent reply	other threads:[~2009-07-17 17:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-17 14:41 [Qemu-devel] [PATCH 0/2][RFC] Introduce macros for setting properties Anthony Liguori
2009-07-17 14:41 ` [Qemu-devel] [PATCH 1/2] Introduce CharDriverState qdev property type Anthony Liguori
2009-07-21 14:46   ` [Qemu-devel] " Gerd Hoffmann
2009-07-21 14:53     ` Anthony Liguori
2009-07-21 15:03       ` Gerd Hoffmann
2009-07-21 15:14         ` Gerd Hoffmann
2009-07-21 15:23         ` Anthony Liguori
2009-07-21 15:34           ` Gerd Hoffmann
2009-07-21 15:47             ` Anthony Liguori
2009-07-22  9:48               ` Gerd Hoffmann
2009-07-17 14:41 ` [Qemu-devel] [PATCH 2/2] Introduce macro for defining qdev properties Anthony Liguori
2009-07-17 17:23   ` Blue Swirl
2009-07-17 17:26     ` Anthony Liguori
2009-07-17 17:33     ` Paul Brook [this message]
2009-07-17 18:11       ` Anthony Liguori
2009-07-17 18:32         ` Blue Swirl
2009-07-17 20:05           ` Anthony Liguori
2009-07-17 22:58             ` Paul Brook
2009-07-18 12:43               ` Jamie Lokier
2009-07-18 16:13                 ` Anthony Liguori
2009-07-20  2:29                   ` Jamie Lokier
2009-07-21  8:30   ` [Qemu-devel] " Gerd Hoffmann

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=200907171833.34167.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).