From d3fd9e4b79f77afea17213a7b32ba9eda7fc59c1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 17 Apr 2019 21:17:59 +0200 Subject: target/i386: Simplify how x86_cpu_dump_local_apic_state() prints x86_cpu_dump_local_apic_state() takes an fprintf()-like callback and a FILE * to pass to it, and so do its helper functions. Its only caller hmp_info_local_apic() passes monitor_fprintf() and the current monitor cast to FILE *. monitor_fprintf() casts it right back, and is otherwise identical to monitor_printf(). The type-punning is ugly. Drop the callback, and call qemu_printf() instead. Signed-off-by: Markus Armbruster Reviewed-by: Dr. David Alan Gilbert Message-Id: <20190417191805.28198-12-armbru@redhat.com> --- target/i386/monitor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'target/i386/monitor.c') diff --git a/target/i386/monitor.c b/target/i386/monitor.c index 74a13c571b..56e2dbece7 100644 --- a/target/i386/monitor.c +++ b/target/i386/monitor.c @@ -664,8 +664,7 @@ void hmp_info_local_apic(Monitor *mon, const QDict *qdict) monitor_printf(mon, "No CPU available\n"); return; } - x86_cpu_dump_local_apic_state(cs, (FILE *)mon, monitor_fprintf, - CPU_DUMP_FPU); + x86_cpu_dump_local_apic_state(cs, CPU_DUMP_FPU); } void hmp_info_io_apic(Monitor *mon, const QDict *qdict) -- cgit v1.2.3