From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnQBn-0001bv-6L for qemu-devel@nongnu.org; Fri, 14 Jun 2013 05:21:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UnQBl-0008GE-VU for qemu-devel@nongnu.org; Fri, 14 Jun 2013 05:20:59 -0400 Received: from cantor2.suse.de ([195.135.220.15]:36559 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnQBl-0008G9-Oh for qemu-devel@nongnu.org; Fri, 14 Jun 2013 05:20:57 -0400 Message-ID: <51BAE077.3000600@suse.de> Date: Fri, 14 Jun 2013 11:20:55 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1371192585-536-1-git-send-email-hutao@cn.fujitsu.com> In-Reply-To: <1371192585-536-1-git-send-email-hutao@cn.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] piix: 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@nongnu.org, Anthony Liguori , "Michael S. Tsirkin" Hi, Am 14.06.2013 08:49, schrieb Hu Tao: > Signed-off-by: Hu Tao > --- > hw/pci-host/piix.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) >=20 > diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c > index f9e68c3..ba9a8f0 100644 > --- a/hw/pci-host/piix.c > +++ b/hw/pci-host/piix.c > @@ -121,22 +121,24 @@ static int pci_slot_get_pirq(PCIDevice *pci_dev, = int pci_intx) > static void i440fx_update_memory_mappings(PCII440FXState *d) > { > int i; > + PCIDevice *pd =3D PCI_DEVICE(d); > =20 > memory_region_transaction_begin(); > for (i =3D 0; i < 13; i++) { > pam_update(&d->pam_regions[i], i, > - d->dev.config[I440FX_PAM + ((i + 1) / 2)]); > + pd->config[I440FX_PAM + ((i + 1) / 2)]); [snip] These two patches will likely conflict with Peter C.'s recent PCI patchset doing the same thing. They look okay, although in one case changing to "dev" variable will force yet another change when later switching to QOM realize with DeviceState *dev. Regards, 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