qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qdev property: cleanup
@ 2016-03-24 10:14 Cao jin
  2016-03-24 11:25 ` Paolo Bonzini
  2016-04-08 11:17 ` Markus Armbruster
  0 siblings, 2 replies; 9+ messages in thread
From: Cao jin @ 2016-03-24 10:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, pbonzini, armbru, peter.maydell

include:
1. remove unnecessary declaration of static function
2. fix inconsistency between comment and function name, and typo OOM->QOM
2. update comment of function

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
---
A question about legacy property: I don`t see legacy property is really
used in the code, so, why still add legacy property to object?

since it has no maintainer, so the cc list is by intuition...

 hw/core/qdev.c               | 14 ++++++--------
 include/hw/qdev-properties.h |  4 ++--
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index db41aa1..743b71b 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -58,9 +58,6 @@ const char *qdev_fw_name(DeviceState *dev)
     return object_get_typename(OBJECT(dev));
 }
 
-static void qdev_property_add_legacy(DeviceState *dev, Property *prop,
-                                     Error **errp);
-
 static void bus_remove_child(BusState *bus, DeviceState *child)
 {
     BusChild *kid;
@@ -908,12 +905,12 @@ static void qdev_get_legacy_property(Object *obj, Visitor *v,
 }
 
 /**
- * @qdev_add_legacy_property - adds a legacy property
+ * @qdev_property_add_legacy - adds a legacy property
  *
  * Do not use this is new code!  Properties added through this interface will
  * be given names and types in the "legacy" namespace.
  *
- * Legacy properties are string versions of other OOM properties.  The format
+ * Legacy properties are string versions of other QOM properties.  The format
  * of the string depends on the property type.
  */
 static void qdev_property_add_legacy(DeviceState *dev, Property *prop,
@@ -937,10 +934,11 @@ static void qdev_property_add_legacy(DeviceState *dev, Property *prop,
 }
 
 /**
- * @qdev_property_add_static - add a @Property to a device.
+ * @qdev_property_add_static
+ * add a QOM property to @dev via its qdev Property @prop
  *
- * Static properties access data in a struct.  The actual type of the
- * property and the field depends on the property type.
+ * Static properties access data in a struct. The actual type of ObjectProperty
+ * and the struct field depends on the @qtype type.
  */
 void qdev_property_add_static(DeviceState *dev, Property *prop,
                               Error **errp)
diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h
index 0586cac..8c4481b 100644
--- a/include/hw/qdev-properties.h
+++ b/include/hw/qdev-properties.h
@@ -197,8 +197,8 @@ void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev,
                                     Property *prop, const char *value);
 
 /**
- * @qdev_property_add_static - add a @Property to a device referencing a
- * field in a struct.
+ * @qdev_property_add_static - add a ObjectProperty to @dev via its qdev
+ * property @prop, referencing a field in the struct.
  */
 void qdev_property_add_static(DeviceState *dev, Property *prop, Error **errp);
 
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-04-15 11:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-24 10:14 [Qemu-devel] [PATCH] qdev property: cleanup Cao jin
2016-03-24 11:25 ` Paolo Bonzini
2016-03-25  6:06   ` Cao jin
2016-04-08 11:17 ` Markus Armbruster
2016-04-09 14:25   ` Cao jin
2016-04-12  8:20     ` Markus Armbruster
2016-04-12 12:49       ` Cao jin
2016-04-15 10:06       ` Paolo Bonzini
2016-04-15 11:15         ` Cao jin

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).