qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] [PATCH v4 8/8] qdev: Warning about using qdev_property_ad


From: Igor Mammedov
Subject: Re: [Qemu-arm] [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)




reply via email to

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