[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/11] qom: Remove container_get()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 09/11] qom: Remove container_get() |
Date: |
Thu, 9 Jan 2025 18:19:46 +0100 |
From: Peter Xu <peterx@redhat.com>
Now there's no user of container_get(), remove it.
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241121192202.4155849-14-peterx@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
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 bcf9910b42c..77935572894 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -2017,17 +2017,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 20ab74b0e8d..38a27ec1edd 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.47.1
- [PULL 00/11] QOM / QDev patches for 2025-01-09, Philippe Mathieu-Daudé, 2025/01/09
- [PULL 01/11] hw/pci: Use -1 as the default value for rombar, Philippe Mathieu-Daudé, 2025/01/09
- [PULL 02/11] qdev: Remove opts member, Philippe Mathieu-Daudé, 2025/01/09
- [PULL 03/11] qdev: Implement qdev_create_fake_machine() for user emulation, Philippe Mathieu-Daudé, 2025/01/09
- [PULL 04/11] qdev: Make qdev_get_machine() not use container_get(), Philippe Mathieu-Daudé, 2025/01/09
- [PULL 05/11] qdev: Add machine_get_container(), Philippe Mathieu-Daudé, 2025/01/09
- [PULL 06/11] qdev: Use machine_get_container(), Philippe Mathieu-Daudé, 2025/01/09
- [PULL 07/11] qom: Add object_get_container(), Philippe Mathieu-Daudé, 2025/01/09
- [PULL 08/11] qom: Use object_get_container(), Philippe Mathieu-Daudé, 2025/01/09
- [PULL 09/11] qom: Remove container_get(),
Philippe Mathieu-Daudé <=
- [PULL 10/11] qom: remove unused InterfaceInfo::concrete_class field, Philippe Mathieu-Daudé, 2025/01/09
- [PULL 11/11] system: Inline machine_containers[] in qemu_create_machine_containers(), Philippe Mathieu-Daudé, 2025/01/09