From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsEPd-0000UD-Hx for qemu-devel@nongnu.org; Mon, 07 Jan 2013 10:14:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsEPY-00082C-Lz for qemu-devel@nongnu.org; Mon, 07 Jan 2013 10:14:53 -0500 Received: from cantor2.suse.de ([195.135.220.15]:38674 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsEPY-00080Y-Fg for qemu-devel@nongnu.org; Mon, 07 Jan 2013 10:14:48 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 7 Jan 2013 16:14:37 +0100 Message-Id: <1357571677-19062-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 qom-cpu] 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: imammedo@redhat.com, Richard Henderson , vilanova@ac.upc.edu, =?UTF-8?q?Andreas=20F=C3=A4rber?= , ehabkost@redhat.com 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 --- 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