Message ID | 1477705687-31175-9-git-send-email-ehabkost@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, 28 Oct 2016 23:48:07 -0200 Eduardo Habkost <ehabkost@redhat.com> 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 <peter.maydell@linaro.org> > Cc: qemu-arm@nongnu.org > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> > --- > 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)
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)
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 <peter.maydell@linaro.org> Cc: qemu-arm@nongnu.org Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- 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(+)