qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 1/1] vhost-user-fs: add migration type property


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v3 1/1] vhost-user-fs: add migration type property
Date: Wed, 22 Feb 2023 18:15:13 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 22.02.23 17:21, Anton Kuchin wrote:


1. I see, other similar qdev_prop_* use DEFINE_PROP_SIGNED

I don't think this should be signed. Enum values are non-negative so compilers
(at least gcc and clang that I checked) evaluate underlying enum type to be 
unsigned int.
I don't know why other property types use signed, may be they have reasons or 
just this
is how they were initially implemented.

2. All of them except only qdev_prop_fdc_drive_type, define also a convenient 
macro in include/hw/qdev-properties-system.h

This makes sense if property is used in more than one place, in this case I 
don't see any
benefit from writing more code to handle this specific case. Maybe if property 
finds its
usage in other devices this can be done.

Reasonable, thanks!

--
Best regards,
Vladimir




reply via email to

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