From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
"Andreas Färber" <afaerber@suse.de>,
"Markus Armbruster" <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 4/7] qdev: Introduce DEFINE_PROP_LINK
Date: Thu, 29 Jun 2017 19:58:16 +0800 [thread overview]
Message-ID: <20170629115816.GI28654@lemon.lan> (raw)
In-Reply-To: <3a67102f-7be4-a4cb-9dad-ce6cdcb3b0a3@redhat.com>
On Thu, 06/29 13:51, Paolo Bonzini wrote:
>
>
> On 29/06/2017 10:04, Fam Zheng wrote:
> > +#define DEFINE_PROP_LINK(_name, _state, _field, _type, _check, _flags) {\
> > + .name = (_name), \
> > + .info = &(qdev_prop_link), \
> > + .offset = offsetof(_state, _field) \
> > + + type_check(Object *, typeof_field(_state, _field)), \
> > + .link.check = _check, \
> > + .link.flags = _flags, \
> > + .link_type = _type, \
> > + }
> > +
>
> Still unsure about _check; qdev_prop_allow_set_link_before_realize is
> mimicking the same behavior of any other qdev property, so it should be
> always okay for DEFINE_PROP_LINK.
OK, let's drop Property.link and use constant check and flags. A
DEFINE_PROP_LINK_FULL can always be added later.
Fam
next prev parent reply other threads:[~2017-06-29 11:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-29 8:04 [Qemu-devel] [PATCH v2 0/7] qdev: Introduce DEFINE_PROP_LINK Fam Zheng
2017-06-29 8:04 ` [Qemu-devel] [PATCH v2 1/7] qom: Make link property API public Fam Zheng
2017-06-29 8:04 ` [Qemu-devel] [PATCH v2 2/7] qom: Handle property lookup failure in object_resolve_link Fam Zheng
2017-06-29 8:04 ` [Qemu-devel] [PATCH v2 3/7] qdev: Introduce PropertyInfo.create Fam Zheng
2017-06-29 8:04 ` [Qemu-devel] [PATCH v2 4/7] qdev: Introduce DEFINE_PROP_LINK Fam Zheng
2017-06-29 10:40 ` Igor Mammedov
2017-06-29 11:11 ` Fam Zheng
2017-06-29 11:51 ` Paolo Bonzini
2017-06-29 11:58 ` Fam Zheng [this message]
2017-06-29 8:04 ` [Qemu-devel] [PATCH v2 5/7] virtio-blk: Use DEFINE_PROP_LINK Fam Zheng
2017-06-29 8:04 ` [Qemu-devel] [PATCH v2 6/7] virtio-scsi: " Fam Zheng
2017-06-29 8:04 ` [Qemu-devel] [PATCH v2 7/7] virtio-rng: " Fam Zheng
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=20170629115816.GI28654@lemon.lan \
--to=famz@redhat.com \
--cc=afaerber@suse.de \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=pbonzini@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).