diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-03-23 16:24:29 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-04-25 12:59:09 +0200 |
commit | edbb66bb305b7d7f9b13734d222cc5e333180948 (patch) | |
tree | 1e6401f6b28a4bb4cc60195775f159a938e87ba1 | |
parent | e828206a0f63867deb9eedc194c49cc40a3b249b (diff) | |
download | qemu-edbb66bb305b7d7f9b13734d222cc5e333180948.zip qemu-edbb66bb305b7d7f9b13734d222cc5e333180948.tar.gz qemu-edbb66bb305b7d7f9b13734d222cc5e333180948.tar.bz2 |
cpus: Remove #ifdef check on cpu_list definition
Since we removed all definitions of cpu_list, the #ifdef
check is always true. Remove it, inlining cpu_list().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20250324185837.46506-7-philmd@linaro.org>
-rw-r--r-- | cpu-target.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/cpu-target.c b/cpu-target.c index d139a18..c99d208 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -77,7 +77,6 @@ const char *parse_cpu_option(const char *cpu_option) return cpu_type; } -#ifndef cpu_list static void cpu_list_entry(gpointer data, gpointer user_data) { CPUClass *cc = CPU_CLASS(OBJECT_CLASS(data)); @@ -91,17 +90,6 @@ static void cpu_list_entry(gpointer data, gpointer user_data) } } -static void cpu_list(void) -{ - GSList *list; - - list = object_class_get_list_sorted(TYPE_CPU, false); - qemu_printf("Available CPUs:\n"); - g_slist_foreach(list, cpu_list_entry, NULL); - g_slist_free(list); -} -#endif - void list_cpus(void) { CPUClass *cc = CPU_CLASS(object_class_by_name(CPU_RESOLVING_TYPE)); @@ -109,7 +97,12 @@ void list_cpus(void) if (cc->list_cpus) { cc->list_cpus(); } else { - cpu_list(); + GSList *list; + + list = object_class_get_list_sorted(TYPE_CPU, false); + qemu_printf("Available CPUs:\n"); + g_slist_foreach(list, cpu_list_entry, NULL); + g_slist_free(list); } } |