[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 8/8] qdev: Warning about using qdev_property_
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH v4 8/8] qdev: Warning about using qdev_property_add_static() in new code |
Date: |
Mon, 31 Oct 2016 15:05:52 +0100 |
On Fri, 28 Oct 2016 23:48:07 -0200
Eduardo Habkost <address@hidden> wrote:
> The only remaining user of qdev_property_add_static() is
> arm_cpu_post_init(), but removing it may take some work. While we
> don't change it, warn people to not use the function in new code.
>
> Cc: Peter Maydell <address@hidden>
> Cc: address@hidden
> Signed-off-by: Eduardo Habkost <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
> ---
> Changes series v1 -> v3:
> * (none)
>
> Changes series v3 -> v4:
> * Rewrote commit message to refer to correct function name
> * s/qdev_class_set_props/device_class_set_props/ (function had
> been renamed in series v3)
> ---
> hw/core/qdev.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> index e695fa8..ae772fc 100644
> --- a/hw/core/qdev.c
> +++ b/hw/core/qdev.c
> @@ -812,6 +812,10 @@ static void qdev_property_set_to_default(DeviceState
> *dev, Property *prop,
> * Add a static QOM property to @dev for qdev property @prop.
> * On error, store error in @errp. Static properties access data in a
> struct.
> * The type of the QOM property is derived from prop->info.
> + *
> + * Do not use this in new code. Either use device_class_set_props(),
> + * or register regular QOM properties using object_property_add() or
> + * object_class_property_add().
> */
> void qdev_property_add_static(DeviceState *dev, Property *prop,
> Error **errp)
- [Qemu-devel] [PATCH v4 2/8] tests: check-qom-proplist: Use &error_abort to catch errors, (continued)
- [Qemu-devel] [PATCH v4 2/8] tests: check-qom-proplist: Use &error_abort to catch errors, Eduardo Habkost, 2016/10/28
- [Qemu-devel] [PATCH v4 4/8] qdev: Extract property-default code to qdev_property_set_to_default(), Eduardo Habkost, 2016/10/28
- [Qemu-devel] [PATCH v4 6/8] qom: object_class_property_iter_init() function, Eduardo Habkost, 2016/10/28
- [Qemu-devel] [PATCH v4 5/8] qdev: Register static properties as class properties, Eduardo Habkost, 2016/10/28
- [Qemu-devel] [PATCH v4 7/8] qmp: Support abstract classes on device-list-properties, Eduardo Habkost, 2016/10/28
- [Qemu-devel] [PATCH v4 8/8] qdev: Warning about using qdev_property_add_static() in new code, Eduardo Habkost, 2016/10/28
- Re: [Qemu-devel] [PATCH v4 8/8] qdev: Warning about using qdev_property_add_static() in new code,
Igor Mammedov <=
- [Qemu-devel] [PATCH v4 3/8] qdev: device_class_set_props() function, Eduardo Habkost, 2016/10/28