* [Qemu-arm] [PATCH v4 8/8] qdev: Warning about using qdev_property_add_static() in new code
[not found] <1477705687-31175-1-git-send-email-ehabkost@redhat.com>
@ 2016-10-29 1:48 ` Eduardo Habkost
2016-10-31 14:05 ` Igor Mammedov
0 siblings, 1 reply; 2+ messages in thread
From: Eduardo Habkost @ 2016-10-29 1:48 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Daniel P. Berrange, Markus Armbruster, qemu-arm,
Igor Mammedov, Andreas Färber
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(+)
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)
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-arm] [PATCH v4 8/8] qdev: Warning about using qdev_property_add_static() in new code
2016-10-29 1:48 ` [Qemu-arm] [PATCH v4 8/8] qdev: Warning about using qdev_property_add_static() in new code Eduardo Habkost
@ 2016-10-31 14:05 ` Igor Mammedov
0 siblings, 0 replies; 2+ messages in thread
From: Igor Mammedov @ 2016-10-31 14:05 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Peter Maydell, Daniel P. Berrange, qemu-devel, Markus Armbruster,
qemu-arm, Andreas Färber
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-31 14:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1477705687-31175-1-git-send-email-ehabkost@redhat.com>
2016-10-29 1:48 ` [Qemu-arm] [PATCH v4 8/8] qdev: Warning about using qdev_property_add_static() in new code Eduardo Habkost
2016-10-31 14:05 ` Igor Mammedov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).