qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 05/45] qdev: remove PropertyInfo.qtype field


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2 05/45] qdev: remove PropertyInfo.qtype field
Date: Wed, 07 Jun 2017 19:37:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Peter Maydell <address@hidden> writes:

> On 7 June 2017 at 14:09, Markus Armbruster <address@hidden> wrote:
>> Peter Maydell <address@hidden> writes:
>>> So how should I obtain those semantics with this cleanup in place ?
>>
>> Two ways come to mind:
>>
>> * Define a PropertyInfo like qdev_prop_uint32 with a null
>>   set_default_value(), and use that.
>>
>> * Add a flag to Property that makes qdev_property_add_static() skip
>>   prop->info->set_default_value(), set it for your property.
>>
>>   Actually, I'd probably do it the other way: call ->set_default_value()
>>   only when the flag is set.  No need to check it's non-null then.
>>   Setting the flag when it's null is a programming error.
>>
>> Could one of these two work for you?
>
> The former would work but duplicates a pile of code from the
> qdev_prop_uint32 implementation. The latter would be cleaner
> but introduces a dependency on this series -- how close is it
> to hitting master?

v2 was close, v3 just hit the list, but I'll be on vacation next week.
Wrapping it up this week seems unrealistic.  Soon after I'm back is my
best estimate.



reply via email to

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