From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvsNR-0002T2-3X for qemu-devel@nongnu.org; Sun, 07 Jul 2013 13:03:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UvsNN-0004KU-Du for qemu-devel@nongnu.org; Sun, 07 Jul 2013 13:03:57 -0400 Received: from cantor2.suse.de ([195.135.220.15]:56102 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvsNN-0004KK-6j for qemu-devel@nongnu.org; Sun, 07 Jul 2013 13:03:53 -0400 Message-ID: <51D99F72.8070205@suse.de> Date: Sun, 07 Jul 2013 19:03:46 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <4bd0ea89802621c5782e4a6c6908a07500efa98c.1372673778.git.hutao@cn.fujitsu.com> In-Reply-To: <4bd0ea89802621c5782e4a6c6908a07500efa98c.1372673778.git.hutao@cn.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 05/26] i440fx: use type-safe cast instead of directly access of parent dev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hu Tao Cc: Peter Crosthwaite , qemu-devel Am 01.07.2013 12:18, schrieb Hu Tao: > Signed-off-by: Hu Tao > --- > hw/pci-host/piix.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) Thanks, converting the remaining dev uses on top and renaming. https://github.com/afaerber/qemu-cpu/commits/qom-next Andreas @@ -194,7 +197,7 @@ static const VMStateDescription vmstate_i440fx =3D { .load_state_old =3D i440fx_load_old, .post_load =3D i440fx_post_load, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(dev, PCII440FXState), + VMSTATE_PCI_DEVICE(parent_obj, PCII440FXState), VMSTATE_UINT8(smm_enabled, PCII440FXState), VMSTATE_END_OF_LIST() } @@ -221,7 +224,7 @@ static int i440fx_initfn(PCIDevice *dev) { PCII440FXState *d =3D I440FX_PCI_DEVICE(dev); - d->dev.config[I440FX_SMRAM] =3D 0x02; + dev->config[I440FX_SMRAM] =3D 0x02; cpu_smm_register(&i440fx_set_smm, d); return 0; @@ -308,9 +311,10 @@ static PCIBus *i440fx_common_init(const char *device_name, *piix3_devfn =3D piix3->dev.devfn; ram_size =3D ram_size / 8 / 1024 / 1024; - if (ram_size > 255) + if (ram_size > 255) { ram_size =3D 255; - (*pi440fx_state)->dev.config[0x57]=3Dram_size; + } + d->config[0x57] =3D ram_size; i440fx_update_memory_mappings(f); --=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