@samitouri / QOSamiQemu / commits / 669f866946

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>

Pierrick Bouvier committed May 14, 2026 at 10:23 UTC 669f866946289ec783b526924aa91f7847b0551e
2 files changed +5 -5
include/qemu/target-info-init.h
-5
@@ -38,11 +38,6 @@ const TargetInfo *target_info(void) \
38 #include "qom/object.h"
39
40 #define target_info_init(ti_var) \
41 -const TargetInfo *target_info(void) \
42 -{ \
43 - return &ti_var; \
44 -} \
45 - \
41 static const TypeInfo target_info_qom_target_type_info = { \
42 .name = TYPE_TARGET_INFO"-"TARGET_NAME, \
43 .parent = TYPE_TARGET_INFO, \
target-info-qom.c
+5
@@ -49,6 +49,11 @@ DEFINE_TARGET_INFO_TYPE(target_info_parent_type)
49
50 static const TargetInfo *target_info_ptr;
51
52 +const TargetInfo *target_info(void)
53 +{
54 + return target_info_ptr;
55 +}
56 +
57 void target_info_qom_set_target(void)
58 {
59 g_autoptr(GSList) targets = object_class_get_list(TYPE_TARGET_INFO, false);