[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 12/13] qom: Use object_get_container()
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 12/13] qom: Use object_get_container() |
Date: |
Thu, 21 Nov 2024 21:15:39 +0100 |
User-agent: |
Mozilla Thunderbird |
On 21/11/24 20:22, Peter Xu wrote:
Use object_get_container() whenever applicable across the tree.
Signed-off-by: Peter Xu <peterx@redhat.com>
---
backends/cryptodev.c | 4 ++--
chardev/char.c | 2 +-
qom/object.c | 2 +-
scsi/pr-manager.c | 4 ++--
ui/console.c | 2 +-
ui/dbus-chardev.c | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/scsi/pr-manager.c b/scsi/pr-manager.c
index fb5fc29730..1977d99ce0 100644
--- a/scsi/pr-manager.c
+++ b/scsi/pr-manager.c
@@ -21,7 +21,7 @@
#include "qemu/module.h"
#include "qapi/qapi-commands-block.h"
-#define PR_MANAGER_PATH "/objects"
+#define PR_MANAGER_PATH "objects"
We can probably inline this string, since the definition isn't
really useful (and match the other uses). Anyway,
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
typedef struct PRManagerData {
PRManager *pr_mgr;
@@ -135,7 +135,7 @@ PRManagerInfoList *qmp_query_pr_managers(Error **errp)
{
PRManagerInfoList *head = NULL;
PRManagerInfoList **prev = &head;
- Object *container = container_get(object_get_root(), PR_MANAGER_PATH);
+ Object *container = object_get_container(PR_MANAGER_PATH);
object_child_foreach(container, query_one_pr_manager, &prev);
return head;
- [PATCH v2 08/13] qdev: Make qdev_get_machine() not use container_get(), (continued)
- [PATCH v2 08/13] qdev: Make qdev_get_machine() not use container_get(), Peter Xu, 2024/11/21
- [PATCH v2 05/13] ppc/e500: Avoid abuse of container_get(), Peter Xu, 2024/11/21
- [PATCH v2 06/13] hw/ppc: Explicitly create the drc container, Peter Xu, 2024/11/21
- [PATCH v2 10/13] qom: Use machine_get_container(), Peter Xu, 2024/11/21
- [PATCH v2 09/13] qdev: Add machine_get_container(), Peter Xu, 2024/11/21
- [PATCH v2 11/13] qom: Add object_get_container(), Peter Xu, 2024/11/21
- [PATCH v2 12/13] qom: Use object_get_container(), Peter Xu, 2024/11/21
- Re: [PATCH v2 12/13] qom: Use object_get_container(),
Philippe Mathieu-Daudé <=
- [PATCH v2 13/13] qom: Remove container_get(), Peter Xu, 2024/11/21