Received: from eggs.gnu.org ([208.118.235.92]:59238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsgEG-0000L3-Cz for qemu-devel@nongnu.org; Tue, 08 Jan 2013 15:57:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsgEF-0005AP-8Y for qemu-devel@nongnu.org; Tue, 08 Jan 2013 15:57:00 -0500 Received: from cantor2.suse.de ([195.135.220.15]:45643 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsgEF-0005AE-3J for qemu-devel@nongnu.org; Tue, 08 Jan 2013 15:56:59 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 8 Jan 2013 21:56:31 +0100 Message-Id: <1357678594-427-15-git-send-email-afaerber@suse.de> In-Reply-To: <1357678594-427-1-git-send-email-afaerber@suse.de> References: <1357678594-427-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 14/17] qemu-common.h: Make qemu_init_vcpu() stub static inline List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Eduardo Habkost 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=C3=ADs Vilanova Signed-off-by: Eduardo Habkost Signed-off-by: Andreas F=C3=A4rber Reviewed-by: Eduardo Habkost --- include/qemu-common.h | 4 +++- target-alpha/cpu.c | 2 -- 2 Dateien ge=C3=A4ndert, 3 Zeilen hinzugef=C3=BCgt(+), 3 Zeilen entfernt= (-) diff --git a/include/qemu-common.h b/include/qemu-common.h index 2b83de3..ca464bb 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -288,7 +288,9 @@ struct qemu_work_item { }; =20 #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 212a625..40e9809 100644 --- a/target-alpha/cpu.c +++ b/target-alpha/cpu.c @@ -26,11 +26,9 @@ =20 static void alpha_cpu_realize(Object *obj, Error **errp) { -#ifndef CONFIG_USER_ONLY AlphaCPU *cpu =3D ALPHA_CPU(obj); =20 qemu_init_vcpu(&cpu->env); -#endif } =20 /* Sort alphabetically by type name. */ --=20 1.7.10.4