From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH v4 04/10] qom: shorten name of object_set_properties_from_keyval
Date: Tue, 12 May 2026 13:29:52 +0100 [thread overview]
Message-ID: <20260512122958.788097-5-berrange@redhat.com> (raw)
In-Reply-To: <20260512122958.788097-1-berrange@redhat.com>
This matches the convention established by the object_set_props and
object_set_propv methods.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
include/qom/object.h | 6 +++---
qom/object_interfaces.c | 12 ++++++------
system/qdev-monitor.c | 4 ++--
system/vl.c | 7 ++++---
4 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/include/qom/object.h b/include/qom/object.h
index c7d80914fb..d841c338a2 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -915,7 +915,7 @@ type_init(do_qemu_init_ ## type_array)
bool type_print_class_properties(const char *type);
/**
- * object_set_properties_from_keyval:
+ * object_set_props_from_keyval:
* @obj: a QOM object
* @qdict: a dictionary with the properties to be set
* @from_json: true if leaf values of @qdict are typed, false if they
@@ -925,8 +925,8 @@ bool type_print_class_properties(const char *type);
* For each key in the dictionary, parse the value string if needed,
* then set the corresponding property in @obj.
*/
-void object_set_properties_from_keyval(Object *obj, const QDict *qdict,
- bool from_json, Error **errp);
+void object_set_props_from_keyval(Object *obj, const QDict *qdict,
+ bool from_json, Error **errp);
/**
* object_class_dynamic_cast_assert:
diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c
index 415cbee8c5..4377d65b76 100644
--- a/qom/object_interfaces.c
+++ b/qom/object_interfaces.c
@@ -44,8 +44,8 @@ bool user_creatable_can_be_deleted(UserCreatable *uc)
}
}
-static void object_set_properties_from_qdict(Object *obj, const QDict *qdict,
- Visitor *v, Error **errp)
+static void object_set_props_from_qdict(Object *obj, const QDict *qdict,
+ Visitor *v, Error **errp)
{
const QDictEntry *e;
@@ -62,8 +62,8 @@ out:
visit_end_struct(v, NULL);
}
-void object_set_properties_from_keyval(Object *obj, const QDict *qdict,
- bool from_json, Error **errp)
+void object_set_props_from_keyval(Object *obj, const QDict *qdict,
+ bool from_json, Error **errp)
{
Visitor *v;
if (from_json) {
@@ -71,7 +71,7 @@ void object_set_properties_from_keyval(Object *obj, const QDict *qdict,
} else {
v = qobject_input_visitor_new_keyval(QOBJECT(qdict));
}
- object_set_properties_from_qdict(obj, qdict, v, errp);
+ object_set_props_from_qdict(obj, qdict, v, errp);
visit_free(v);
}
@@ -110,7 +110,7 @@ Object *user_creatable_add_type(const char *type, const char *id,
assert(qdict);
obj = object_new_with_class(klass);
- object_set_properties_from_qdict(obj, qdict, v, &local_err);
+ object_set_props_from_qdict(obj, qdict, v, &local_err);
if (local_err) {
goto out;
}
diff --git a/system/qdev-monitor.c b/system/qdev-monitor.c
index e5b55e3004..dfc95a08c1 100644
--- a/system/qdev-monitor.c
+++ b/system/qdev-monitor.c
@@ -730,8 +730,8 @@ DeviceState *qdev_device_add_from_qdict(const QDict *opts,
qdict_del(properties, "bus");
qdict_del(properties, "id");
- object_set_properties_from_keyval(&dev->parent_obj, properties, from_json,
- errp);
+ object_set_props_from_keyval(&dev->parent_obj, properties, from_json,
+ errp);
qobject_unref(properties);
if (*errp) {
goto err_del_dev;
diff --git a/system/vl.c b/system/vl.c
index d2f4044e5d..288819c409 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -2009,7 +2009,8 @@ static bool object_create_early(const char *type)
static void qemu_apply_machine_options(QDict *qdict)
{
- object_set_properties_from_keyval(OBJECT(current_machine), qdict, false, &error_fatal);
+ object_set_props_from_keyval(OBJECT(current_machine), qdict,
+ false, &error_fatal);
if (semihosting_enabled(false) && !semihosting_get_argc()) {
/* fall back to the -kernel/-append */
@@ -2224,8 +2225,8 @@ static void qemu_create_machine(QDict *qdict)
keyval_parse(machine_class->default_machine_opts, NULL, NULL,
&error_abort);
qemu_apply_legacy_machine_options(default_opts);
- object_set_properties_from_keyval(OBJECT(current_machine), default_opts,
- false, &error_abort);
+ object_set_props_from_keyval(OBJECT(current_machine), default_opts,
+ false, &error_abort);
qobject_unref(default_opts);
}
}
--
2.54.0
next prev parent reply other threads:[~2026-05-12 12:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 12:29 [PATCH v4 00/10] qom: misc cleanups / fixes Daniel P. Berrangé
2026-05-12 12:29 ` [PATCH v4 01/10] qom: add trace events for object/property lifecycle Daniel P. Berrangé
2026-05-13 6:16 ` Philippe Mathieu-Daudé
2026-05-13 14:33 ` Philippe Mathieu-Daudé
2026-05-12 12:29 ` [PATCH v4 02/10] qom: validate ID format when creating objects Daniel P. Berrangé
2026-05-13 14:35 ` Philippe Mathieu-Daudé
2026-05-12 12:29 ` [PATCH v4 03/10] qom: make errp last param in methods taking va_list Daniel P. Berrangé
2026-05-12 12:29 ` Daniel P. Berrangé [this message]
2026-05-12 12:29 ` [PATCH v4 05/10] qom: have object_set_props_keyval return bool Daniel P. Berrangé
2026-05-12 12:29 ` [PATCH v4 06/10] qom: move object_set_prop_keyval into object.c Daniel P. Berrangé
2026-05-12 12:29 ` [PATCH v4 07/10] qom: add object_new_with_props_from_qdict Daniel P. Berrangé
2026-05-12 12:29 ` [PATCH v4 08/10] qom: fix ability to create objects without a parent Daniel P. Berrangé
2026-05-13 14:35 ` Philippe Mathieu-Daudé
2026-05-12 12:29 ` [PATCH v4 09/10] qom: allow object_new_with_prop* to trigger module loading Daniel P. Berrangé
2026-05-12 12:29 ` [PATCH v4 10/10] qom: drop user_creatable_add_type method Daniel P. Berrangé
2026-05-13 14:35 ` Philippe Mathieu-Daudé
2026-05-12 13:12 ` [PATCH v4 00/10] qom: misc cleanups / fixes marcandre.lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260512122958.788097-5-berrange@redhat.com \
--to=berrange@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox