From: Andreas Färber Date: Sat, 5 Jan 2013 13:44:08 +0000 (+0100) Subject: qemu-common.h: Make qemu_init_vcpu() stub static inline X-Git-Tag: qemu-xen-4.4.0-rc1~6^2~1446^2~3 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=75a192aa68e7801ab8465b3345ac74d6d3cdceca;p=qemu-upstream-4.5-testing.git qemu-common.h: Make qemu_init_vcpu() stub static inline Turn the *-user macro into a no-op inline function to avoid unused-variable warnings and band-aiding #ifdef'ery. This allows to drop an #ifdef for alpha and avoids more for unicore32 and other upcoming trivial realizefn implementations. Suggested-by: Lluís Vilanova Signed-off-by: Eduardo Habkost Signed-off-by: Andreas Färber Reviewed-by: Eduardo Habkost --- diff --git a/include/qemu-common.h b/include/qemu-common.h index 2b83de395..ca464bb36 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -288,7 +288,9 @@ struct qemu_work_item { }; #ifdef CONFIG_USER_ONLY -#define qemu_init_vcpu(env) do { } while (0) +static inline void qemu_init_vcpu(void *env) +{ +} #else void qemu_init_vcpu(void *env); #endif diff --git a/target-alpha/cpu.c b/target-alpha/cpu.c index 212a6250b..40e980933 100644 --- a/target-alpha/cpu.c +++ b/target-alpha/cpu.c @@ -26,11 +26,9 @@ static void alpha_cpu_realize(Object *obj, Error **errp) { -#ifndef CONFIG_USER_ONLY AlphaCPU *cpu = ALPHA_CPU(obj); qemu_init_vcpu(&cpu->env); -#endif } /* Sort alphabetically by type name. */