Patchwork [2/4] piix_pci: Use ISA_BUS() instead of DO_UPCAST()

login
register
mail settings
Submitter David Woodhouse
Date Feb. 20, 2013, 9:46 p.m.
Message ID <1361396809-12973-2-git-send-email-dwmw2@infradead.org>
Download mbox | patch
Permalink /patch/222154/
State New
Headers show

Comments

David Woodhouse - Feb. 20, 2013, 9:46 p.m.
From: David Woodhouse <David.Woodhouse@intel.com>

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
---
 hw/piix_pci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Andreas Färber - Feb. 20, 2013, 11:08 p.m.
Am 20.02.2013 22:46, schrieb David Woodhouse:
> From: David Woodhouse <David.Woodhouse@intel.com>
> 
> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
> ---
>  hw/piix_pci.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/hw/piix_pci.c b/hw/piix_pci.c
> index 6b69e26..d45449a 100644
> --- a/hw/piix_pci.c
> +++ b/hw/piix_pci.c
> @@ -301,8 +301,7 @@ static PCIBus *i440fx_common_init(const char *device_name,
>          pci_bus_set_route_irq_fn(b, piix3_route_intx_pin_to_irq);
>      }
>      piix3->pic = pic;
> -    *isa_bus = DO_UPCAST(ISABus, qbus,
> -                         qdev_get_child_bus(&piix3->dev.qdev, "isa.0"));
> +    *isa_bus = ISA_BUS(qdev_get_child_bus(&piix3->dev.qdev, "isa.0"));
>  
>      *piix3_devfn = piix3->dev.devfn;
>  

Use of ISA_BUS() is correct, but it would be nice to use (DEVICE(piix3),
...) if respun.

Andreas
David Woodhouse - Feb. 20, 2013, 11:19 p.m.
On Thu, 2013-02-21 at 00:08 +0100, Andreas Färber wrote:
> Use of ISA_BUS() is correct, but it would be nice to use
> (DEVICE(piix3), ...) if respun.

http://git.infradead.org/users/dwmw2/qemu.git/commitdiff/16d69961
Andreas Färber - Feb. 20, 2013, 11:35 p.m.
Am 21.02.2013 00:19, schrieb David Woodhouse:
> On Thu, 2013-02-21 at 00:08 +0100, Andreas Färber wrote:
>> Use of ISA_BUS() is correct, but it would be nice to use
>> (DEVICE(piix3), ...) if respun.
> 
> http://git.infradead.org/users/dwmw2/qemu.git/commitdiff/16d69961

Perfect!

Andreas

Patch

diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index 6b69e26..d45449a 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -301,8 +301,7 @@  static PCIBus *i440fx_common_init(const char *device_name,
         pci_bus_set_route_irq_fn(b, piix3_route_intx_pin_to_irq);
     }
     piix3->pic = pic;
-    *isa_bus = DO_UPCAST(ISABus, qbus,
-                         qdev_get_child_bus(&piix3->dev.qdev, "isa.0"));
+    *isa_bus = ISA_BUS(qdev_get_child_bus(&piix3->dev.qdev, "isa.0"));
 
     *piix3_devfn = piix3->dev.devfn;