Received: from eggs.gnu.org ([208.118.235.92]:49847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsHA1-00057Q-1B for qemu-devel@nongnu.org; Mon, 07 Jan 2013 13:10:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsH9z-0004xU-Pe for qemu-devel@nongnu.org; Mon, 07 Jan 2013 13:10:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsH9z-0004xO-Gd for qemu-devel@nongnu.org; Mon, 07 Jan 2013 13:10:55 -0500 Date: Mon, 7 Jan 2013 16:12:31 -0200 From: Eduardo Habkost Message-ID: <20130107181231.GF26746@otherpad.lan.raisama.net> References: <1357571677-19062-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1357571677-19062-1-git-send-email-afaerber@suse.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [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: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: vilanova@ac.upc.edu, imammedo@redhat.com, qemu-devel@nongnu.org, Richard Henderson On Mon, Jan 07, 2013 at 04:14:37PM +0100, Andreas F=E4rber wrote: > Turn the *-user macro into a no-op inline function to avoid > unused-variable warnings and band-aiding #ifdef'ery. >=20 > This allows to drop an #ifdef for alpha and avoids more for unicore32 > and other upcoming trivial realizefn implementations. >=20 > Suggested-by: Llu=EDs Vilanova > Signed-off-by: Eduardo Habkost > Signed-off-by: Andreas F=E4rber Reviewed-by: Eduardo Habkost > --- > include/qemu-common.h | 4 +++- > target-alpha/cpu.c | 2 -- > 2 Dateien ge=E4ndert, 3 Zeilen hinzugef=FCgt(+), 3 Zeilen entfernt(-) >=20 > 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 >=20 >=20 --=20 Eduardo