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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 4/7] qdev: Introduce DEFINE_PROP_LINK
Date: Thu, 29 Jun 2017 13:51:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0


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.

Paolo



reply via email to

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