From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0ul7-0007cT-B8 for qemu-devel@nongnu.org; Mon, 13 Aug 2012 09:32:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0ukx-00007i-Od for qemu-devel@nongnu.org; Mon, 13 Aug 2012 09:32:41 -0400 Message-ID: <502901E6.7060502@suse.de> Date: Mon, 13 Aug 2012 15:32:22 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1343872026-18189-1-git-send-email-afaerber@suse.de> <1343872026-18189-15-git-send-email-afaerber@suse.de> <87d32vkk70.fsf@codemonkey.ws> In-Reply-To: <87d32vkk70.fsf@codemonkey.ws> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for-1.2 v5 14/14] pci: Tidy up PCI host bridges List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: mst@redhat.com, Alexander Graf , qemu-devel@nongnu.org, qemu-ppc , Scott Wood , David Gibson Am 13.08.2012 15:14, schrieb Anthony Liguori: > Andreas F=C3=A4rber writes: >=20 >> diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c >> index df70cd2..8937030 100644 >> --- a/hw/spapr_pci.c >> +++ b/hw/spapr_pci.c >> @@ -36,16 +36,18 @@ static PCIDevice *find_dev(sPAPREnvironment *spapr= , >> uint64_t buid, uint32_t config_addr) >> { >> int devfn =3D (config_addr >> 8) & 0xFF; >> - sPAPRPHBState *phb; >> + sPAPRPHBState *sphb; >> =20 >> - QLIST_FOREACH(phb, &spapr->phbs, list) { >> + QLIST_FOREACH(sphb, &spapr->phbs, list) { >> + PCIHostState *phb; >> BusChild *kid; >> =20 >> - if (phb->buid !=3D buid) { >> + if (sphb->buid !=3D buid) { >> continue; >> } >> =20 >> - QTAILQ_FOREACH(kid, &phb->host_state.bus->qbus.children, sibl= ing) { >> + phb =3D PCI_HOST_BRIDGE(sphb); >> + QTAILQ_FOREACH(kid, &BUS(phb->bus)->children, sibling) { >> PCIDevice *dev =3D (PCIDevice *)kid->child; >> if (dev->devfn =3D=3D devfn) { >> return dev; >> @@ -319,7 +321,7 @@ static int spapr_phb_init(SysBusDevice *s) >> pci_spapr_set_irq, pci_spapr_map_irq, phb, >> &phb->memspace, &phb->iospace, >> PCI_DEVFN(0, 0), PCI_NUM_PINS); >> - phb->host_state.bus =3D bus; >> + PCI_HOST_BRIDGE(phb)->bus =3D bus; >=20 > I think you meant: >=20 > PCI_HOST_BRIDGE(sphb)->bus >=20 > But really you meant: >=20 > phb->bus =3D bus; The patch is misleading here, in the initfn phb historically is sPAPRPHBState, not PCIHostState. But you are right that this inline macro usage should be fixed - will solve by squashing phb -> sphb renaming into the spapr_pci patch. Thanks, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg