qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 4/7] qdev: Introduce DEFINE_PROP_LINK


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v2 4/7] qdev: Introduce DEFINE_PROP_LINK
Date: Thu, 29 Jun 2017 19:58:16 +0800
User-agent: Mutt/1.8.0 (2017-02-23)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]