[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH for-1.2 v5 14/14] pci: Tidy up PCI host bridges
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-ppc] [PATCH for-1.2 v5 14/14] pci: Tidy up PCI host bridges |
Date: |
Mon, 13 Aug 2012 16:16:59 +0300 |
On Thu, Aug 02, 2012 at 03:47:06AM +0200, Andreas Färber wrote:
> Uglify the parent field to enforce QOM-style access via casts.
> Don't just typedef PCIHostState, either use it directly or embed it.
>
> Signed-off-by: Andreas Färber <address@hidden>
IMHO only one chunk from this patch should be applied (below).
Below it is split out but needs to be rebased on top of patches
1-13.
-->
From: Andreas Färber <address@hidden>
piix: minor code simplification
There's no need to deal with qdev internals in piix - we get device
state from qdev_create so just use that.
Signed-off-by: Andreas Färber <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index c497a01..18554a6 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -274,7 +274,7 @@ static PCIBus *i440fx_common_init(const char *device_name,
dev = qdev_create(NULL, "i440FX-pcihost");
s = FROM_SYSBUS(I440FXState, sysbus_from_qdev(dev));
s->address_space = address_space_mem;
- b = pci_bus_new(&s->busdev.qdev, NULL, pci_address_space,
+ b = pci_bus_new(&dev, NULL, pci_address_space,
address_space_io, 0);
s->bus = b;
object_property_add_child(qdev_get_machine(), "i440fx", OBJECT(dev), NULL);