Commit 669f866946 for qemu.org
commit 669f866946289ec783b526924aa91f7847b0551e
Author: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Date: Thu May 14 10:23:03 2026 -0700
target-info: replace target_info() in system-mode
We now can use TargetInfo information available from QOM, and remove
duplicated target_info() symbol.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260514172303.1484273-6-pierrick.bouvier@oss.qualcomm.com
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
diff --git a/include/qemu/target-info-init.h b/include/qemu/target-info-init.h
index 32c323a7ef..b7024c9fae 100644
--- a/include/qemu/target-info-init.h
+++ b/include/qemu/target-info-init.h
@@ -38,11 +38,6 @@ const TargetInfo *target_info(void) \
#include "qom/object.h"
#define target_info_init(ti_var) \
-const TargetInfo *target_info(void) \
-{ \
- return &ti_var; \
-} \
- \
static const TypeInfo target_info_qom_target_type_info = { \
.name = TYPE_TARGET_INFO"-"TARGET_NAME, \
.parent = TYPE_TARGET_INFO, \
diff --git a/target-info-qom.c b/target-info-qom.c
index 9947fcc992..b48714cc77 100644
--- a/target-info-qom.c
+++ b/target-info-qom.c
@@ -49,6 +49,11 @@ DEFINE_TARGET_INFO_TYPE(target_info_parent_type)
static const TargetInfo *target_info_ptr;
+const TargetInfo *target_info(void)
+{
+ return target_info_ptr;
+}
+
void target_info_qom_set_target(void)
{
g_autoptr(GSList) targets = object_class_get_list(TYPE_TARGET_INFO, false);