Patchwork spapr: fix build

login
register
mail settings
Submitter Anthony Liguori
Date Nov. 1, 2011, 9:51 p.m.
Message ID <1320184304-10089-1-git-send-email-aliguori@us.ibm.com>
Download mbox | patch
Permalink /patch/123145/
State New
Headers show

Comments

Anthony Liguori - Nov. 1, 2011, 9:51 p.m.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 hw/spapr_pci.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Alexander Graf - Nov. 1, 2011, 10:16 p.m.
On 01.11.2011, at 14:51, Anthony Liguori <aliguori@us.ibm.com> wrote:

> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

If that's what it takes to make it compile for you, please apply it. i'm currently not anywhere close to a box to test it on myself (and figure out what went wrong).

Reviewed-by: Alexander Graf <agraf@suse.de>

Alex

> ---
> hw/spapr_pci.c |    4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c
> index 2a5e637..7162588 100644
> --- a/hw/spapr_pci.c
> +++ b/hw/spapr_pci.c
> @@ -51,7 +51,7 @@ static PCIDevice *find_dev(sPAPREnvironment *spapr,
>             continue;
>         }
> 
> -        QLIST_FOREACH(qdev, &phb->host_state.bus->qbus.children, sibling) {
> +        QTAILQ_FOREACH(qdev, &phb->host_state.bus->qbus.children, sibling) {
>             PCIDevice *dev = (PCIDevice *)qdev;
>             if (dev->devfn == devfn) {
>                 return dev;
> @@ -397,7 +397,7 @@ int spapr_populate_pci_devices(sPAPRPHBState *phb,
> 
>     /* Populate PCI devices and allocate IRQs */
>     devices = 0;
> -    QLIST_FOREACH(qdev, &bus->qbus.children, sibling) {
> +    QTAILQ_FOREACH(qdev, &bus->qbus.children, sibling) {
>         PCIDevice *dev = DO_UPCAST(PCIDevice, qdev, qdev);
>         int irq_index = pci_spapr_map_irq(dev, 0);
>         uint32_t *irqmap = interrupt_map[devices];
> -- 
> 1.7.4.1
>
David Gibson - Nov. 2, 2011, 12:13 a.m.
On Tue, Nov 01, 2011 at 03:16:14PM -0700, Alexander Graf wrote:
> 
> 
> 
> 
> On 01.11.2011, at 14:51, Anthony Liguori <aliguori@us.ibm.com> wrote:
> 
> > Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
> 
> If that's what it takes to make it compile for you, please apply
> it. i'm currently not anywhere close to a box to test it on myself
> (and figure out what went wrong).
> 
> Reviewed-by: Alexander Graf <agraf@suse.de>

I independently created this patch yesterday and it worked, so

Acked-by: David Gibson <david@gibson.dropbear.id.au>

Patch

diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c
index 2a5e637..7162588 100644
--- a/hw/spapr_pci.c
+++ b/hw/spapr_pci.c
@@ -51,7 +51,7 @@  static PCIDevice *find_dev(sPAPREnvironment *spapr,
             continue;
         }
 
-        QLIST_FOREACH(qdev, &phb->host_state.bus->qbus.children, sibling) {
+        QTAILQ_FOREACH(qdev, &phb->host_state.bus->qbus.children, sibling) {
             PCIDevice *dev = (PCIDevice *)qdev;
             if (dev->devfn == devfn) {
                 return dev;
@@ -397,7 +397,7 @@  int spapr_populate_pci_devices(sPAPRPHBState *phb,
 
     /* Populate PCI devices and allocate IRQs */
     devices = 0;
-    QLIST_FOREACH(qdev, &bus->qbus.children, sibling) {
+    QTAILQ_FOREACH(qdev, &bus->qbus.children, sibling) {
         PCIDevice *dev = DO_UPCAST(PCIDevice, qdev, qdev);
         int irq_index = pci_spapr_map_irq(dev, 0);
         uint32_t *irqmap = interrupt_map[devices];