From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpFzn-0005PB-Lw for qemu-devel@nongnu.org; Wed, 19 Jun 2013 06:52:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UpFzm-00020x-M2 for qemu-devel@nongnu.org; Wed, 19 Jun 2013 06:52:11 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58594 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpFzm-00020i-FU for qemu-devel@nongnu.org; Wed, 19 Jun 2013 06:52:10 -0400 Message-ID: <51C18D58.2080800@suse.de> Date: Wed, 19 Jun 2013 12:52:08 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <267c3875ca8d6b674f8343de3d22caad8f551fe6.1371553360.git.peter.crosthwaite@xilinx.com> In-Reply-To: <267c3875ca8d6b674f8343de3d22caad8f551fe6.1371553360.git.peter.crosthwaite@xilinx.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v1 3/5] block/nand: QOM casting sweep List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.crosthwaite@xilinx.com Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, edgar.iglesias@gmail.com Am 18.06.2013 13:10, schrieb peter.crosthwaite@xilinx.com: > From: Peter Crosthwaite >=20 > Define and use standard QOM cast macro. Remove usages of DO_UPCAST and > direct -> style casting. >=20 > Cc: afaerber@suse.de >=20 > Signed-off-by: Peter Crosthwaite > --- >=20 > hw/block/nand.c | 25 ++++++++++++++++--------- > 1 file changed, 16 insertions(+), 9 deletions(-) >=20 > diff --git a/hw/block/nand.c b/hw/block/nand.c > index de0a022..d2469f5 100644 > --- a/hw/block/nand.c > +++ b/hw/block/nand.c [...] > @@ -319,14 +324,14 @@ static void nand_command(NANDFlashState *s) > =20 > static void nand_pre_save(void *opaque) > { > - NANDFlashState *s =3D opaque; > + NANDFlashState *s =3D NAND(opaque); > =20 > s->ioaddr_vmstate =3D s->ioaddr - s->io; > } > =20 > static int nand_post_load(void *opaque, int version_id) > { > - NANDFlashState *s =3D opaque; > + NANDFlashState *s =3D NAND(opaque); > =20 > if (s->ioaddr_vmstate > sizeof(s->io)) { > return -EINVAL; [snip] These two are not strictly necessary, but either way: Reviewed-by: Andreas F=E4rber 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