From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Markus Armbruster" <armbru@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Juraj Marcin" <jmarcin@redhat.com>,
peterx@redhat.com, "Daniel P . Berrangé" <berrange@redhat.com>,
"Fabiano Rosas" <farosas@suse.de>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Cédric Le Goater" <clg@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>
Subject: [PATCH v2 13/13] qom: Remove container_get()
Date: Thu, 21 Nov 2024 14:22:02 -0500 [thread overview]
Message-ID: <20241121192202.4155849-14-peterx@redhat.com> (raw)
In-Reply-To: <20241121192202.4155849-1-peterx@redhat.com>
Now there's no user of container_get(), remove it.
Signed-off-by: Peter Xu <peterx@redhat.com>
---
include/qom/object.h | 11 -----------
qom/container.c | 23 -----------------------
2 files changed, 34 deletions(-)
diff --git a/include/qom/object.h b/include/qom/object.h
index 4eeee7f7c4..f3a887e34f 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -2031,17 +2031,6 @@ int object_child_foreach(Object *obj, int (*fn)(Object *child, void *opaque),
int object_child_foreach_recursive(Object *obj,
int (*fn)(Object *child, void *opaque),
void *opaque);
-/**
- * container_get:
- * @root: root of the #path, e.g., object_get_root()
- * @path: path to the container
- *
- * Return a container object whose path is @path. Create more containers
- * along the path if necessary.
- *
- * Returns: the container object.
- */
-Object *container_get(Object *root, const char *path);
/**
* object_property_add_new_container:
diff --git a/qom/container.c b/qom/container.c
index 20ab74b0e8..38a27ec1ed 100644
--- a/qom/container.c
+++ b/qom/container.c
@@ -34,27 +34,4 @@ Object *object_property_add_new_container(Object *obj, const char *name)
return child;
}
-Object *container_get(Object *root, const char *path)
-{
- Object *obj, *child;
- char **parts;
- int i;
-
- parts = g_strsplit(path, "/", 0);
- assert(parts != NULL && parts[0] != NULL && !parts[0][0]);
- obj = root;
-
- for (i = 1; parts[i] != NULL; i++, obj = child) {
- child = object_resolve_path_component(obj, parts[i]);
- if (!child) {
- child = object_property_add_new_container(obj, parts[i]);
- }
- }
-
- g_strfreev(parts);
-
- return obj;
-}
-
-
type_init(container_register_types)
--
2.45.0
next prev parent reply other threads:[~2024-11-21 19:22 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 19:21 [PATCH v2 00/13] QOM: container_get() removal Peter Xu
2024-11-21 19:21 ` [PATCH v2 01/13] qom: Add TYPE_CONTAINER macro Peter Xu
2024-11-21 19:21 ` [PATCH v2 02/13] qom: New object_property_add_new_container() Peter Xu
2024-11-21 20:21 ` Philippe Mathieu-Daudé
2024-11-22 14:12 ` Markus Armbruster
2024-11-21 19:21 ` [PATCH v2 03/13] tests: Fix test-qdev-global-props on anonymous qdev realize() Peter Xu
2024-11-21 19:21 ` [PATCH v2 04/13] tests: Explicitly create containers in test_qom_partial_path() Peter Xu
2024-11-21 19:21 ` [PATCH v2 05/13] ppc/e500: Avoid abuse of container_get() Peter Xu
2024-11-21 19:21 ` [PATCH v2 06/13] hw/ppc: Explicitly create the drc container Peter Xu
2024-11-21 20:20 ` Philippe Mathieu-Daudé
2024-11-21 19:21 ` [PATCH v2 07/13] qom: Create system containers explicitly Peter Xu
2024-11-21 20:19 ` Philippe Mathieu-Daudé
2024-11-21 19:21 ` [PATCH v2 08/13] qdev: Make qdev_get_machine() not use container_get() Peter Xu
2024-11-21 20:21 ` Philippe Mathieu-Daudé
2024-12-19 18:20 ` Philippe Mathieu-Daudé
2024-12-19 18:27 ` Philippe Mathieu-Daudé
2024-12-20 11:25 ` Philippe Mathieu-Daudé
2024-12-20 17:24 ` Peter Xu
2024-12-20 21:38 ` Philippe Mathieu-Daudé
2024-12-23 17:29 ` Peter Xu
2024-11-21 19:21 ` [PATCH v2 09/13] qdev: Add machine_get_container() Peter Xu
2024-11-21 19:21 ` [PATCH v2 10/13] qom: Use machine_get_container() Peter Xu
2024-11-21 20:16 ` Philippe Mathieu-Daudé
2025-01-02 13:58 ` Philippe Mathieu-Daudé
2024-11-21 19:22 ` [PATCH v2 11/13] qom: Add object_get_container() Peter Xu
2024-11-21 19:22 ` [PATCH v2 12/13] qom: Use object_get_container() Peter Xu
2024-11-21 20:15 ` Philippe Mathieu-Daudé
2024-11-21 19:22 ` Peter Xu [this message]
2024-11-21 20:14 ` [PATCH v2 13/13] qom: Remove container_get() Philippe Mathieu-Daudé
2024-12-19 17:29 ` [PATCH v2 00/13] QOM: container_get() removal Philippe Mathieu-Daudé
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=20241121192202.4155849-14-peterx@redhat.com \
--to=peterx@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=clg@redhat.com \
--cc=eduardo@habkost.net \
--cc=farosas@suse.de \
--cc=jmarcin@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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;
as well as URLs for NNTP newsgroup(s).