From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCvOF-000493-ML for qemu-devel@nongnu.org; Tue, 05 Mar 2013 12:11:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCvOA-00024C-LK for qemu-devel@nongnu.org; Tue, 05 Mar 2013 12:10:59 -0500 Received: from cantor2.suse.de ([195.135.220.15]:51841 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCvOA-00023v-9r for qemu-devel@nongnu.org; Tue, 05 Mar 2013 12:10:54 -0500 Message-ID: <5136271D.5060104@suse.de> Date: Tue, 05 Mar 2013 18:10:53 +0100 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1361816570-8707-1-git-send-email-afaerber@suse.de> <1361816570-8707-5-git-send-email-afaerber@suse.de> <20130226193203.GC32578@otherpad.lan.raisama.net> In-Reply-To: <20130226193203.GC32578@otherpad.lan.raisama.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-cpu v3 4/6] cpu: Introduce cpu_class_set_vmsd() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: qemu-devel@nongnu.org, quintela@redhat.com Am 26.02.2013 20:32, schrieb Eduardo Habkost: > On Mon, Feb 25, 2013 at 07:22:48PM +0100, Andreas F=E4rber wrote: >> This setter avoids redefining each VMStateDescription value to >> vmstate_dummy by not referencing the value for CONFIG_USER_ONLY. >> >> Suggested-by: Juan Quintela >> Signed-off-by: Andreas F=E4rber >> --- >> include/qom/cpu.h | 17 +++++++++++++++++ >> 1 Datei ge=E4ndert, 17 Zeilen hinzugef=FCgt(+) >> >> diff --git a/include/qom/cpu.h b/include/qom/cpu.h >> index 1106e39..65e24d3 100644 >> --- a/include/qom/cpu.h >> +++ b/include/qom/cpu.h >> @@ -135,6 +135,23 @@ void cpu_reset(CPUState *cpu); >> ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_= model); >> =20 >> /** >> + * cpu_class_set_vmsd: >> + * @cc: CPU class >> + * @value: Value to set. >> + * >> + * Sets #VMStateDescription for @cc. >> + */ >> +#ifndef CONFIG_USER_ONLY >> +static inline void cpu_class_set_vmsd(CPUClass *cc, >> + const struct VMStateDescription= *value) >> +{ >> + cc->vmsd =3D value; >> +} >> +#else >> +#define cpu_class_set_vmsd(cpu, val) ((cpu)->vmsd =3D NULL) >=20 > Even after reading the description above, I was going to ask you why > this was not an inline function as well. But then I read patch 5/6 and > understood why. :-) >=20 > I would add a coment here noting that "val" is actually expected to be > never evaluated when CONFIG_USER_ONLY is defined. Done. I also renamed the arguments to match those of the function. >=20 > Reviewed-by: Eduardo Habkost Thanks, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg