Re: [Qemu-devel] [RFC 1/7] pci: Change pci_host_bus_register() parameter to PCIHostState
On 04/18/2017 12:59 AM, Eduardo Habkost wrote: The function requires a PCI_HOST_BRIDGE object, so change the parameter type to reflect that. Cc: "Michael S. Tsirkin"Cc: Marcel Apfelbaum Signed-off-by: Eduardo Habkost --- hw/pci/pci.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 259483b1c0..25118fb91d 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -312,11 +312,9 @@ static void pcibus_reset(BusState *qbus) } } -static void pci_host_bus_register(DeviceState *host) +static void pci_host_bus_register(PCIHostState *phb) { -PCIHostState *host_bridge = PCI_HOST_BRIDGE(host); - -QLIST_INSERT_HEAD(_host_bridges, host_bridge, next); +QLIST_INSERT_HEAD(_host_bridges, phb, next); } PCIBus *pci_find_primary_bus(void) @@ -377,7 +375,7 @@ static void pci_bus_init(PCIBus *bus, DeviceState *parent, /* host bridge */ QLIST_INIT(>child); -pci_host_bus_register(parent); +pci_host_bus_register(PCI_HOST_BRIDGE(host)); } bool pci_bus_is_express(PCIBus *bus) Reviewed-by: Marcel Apfelbaum Thanks, Marcel
Re: [Qemu-devel] [RFC 1/7] pci: Change pci_host_bus_register() parameter to PCIHostState
On Mon, Apr 17, 2017 at 06:59:10PM -0300, Eduardo Habkost wrote: > The function requires a PCI_HOST_BRIDGE object, so change the parameter > type to reflect that. > > Cc: "Michael S. Tsirkin"> Cc: Marcel Apfelbaum > Signed-off-by: Eduardo Habkost Reviewed-by: David Gibson > --- > hw/pci/pci.c | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/hw/pci/pci.c b/hw/pci/pci.c > index 259483b1c0..25118fb91d 100644 > --- a/hw/pci/pci.c > +++ b/hw/pci/pci.c > @@ -312,11 +312,9 @@ static void pcibus_reset(BusState *qbus) > } > } > > -static void pci_host_bus_register(DeviceState *host) > +static void pci_host_bus_register(PCIHostState *phb) > { > -PCIHostState *host_bridge = PCI_HOST_BRIDGE(host); > - > -QLIST_INSERT_HEAD(_host_bridges, host_bridge, next); > +QLIST_INSERT_HEAD(_host_bridges, phb, next); > } > > PCIBus *pci_find_primary_bus(void) > @@ -377,7 +375,7 @@ static void pci_bus_init(PCIBus *bus, DeviceState *parent, > /* host bridge */ > QLIST_INIT(>child); > > -pci_host_bus_register(parent); > +pci_host_bus_register(PCI_HOST_BRIDGE(host)); > } > > bool pci_bus_is_express(PCIBus *bus) -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson signature.asc Description: PGP signature
[Qemu-devel] [RFC 1/7] pci: Change pci_host_bus_register() parameter to PCIHostState
The function requires a PCI_HOST_BRIDGE object, so change the parameter type to reflect that. Cc: "Michael S. Tsirkin"Cc: Marcel Apfelbaum Signed-off-by: Eduardo Habkost --- hw/pci/pci.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 259483b1c0..25118fb91d 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -312,11 +312,9 @@ static void pcibus_reset(BusState *qbus) } } -static void pci_host_bus_register(DeviceState *host) +static void pci_host_bus_register(PCIHostState *phb) { -PCIHostState *host_bridge = PCI_HOST_BRIDGE(host); - -QLIST_INSERT_HEAD(_host_bridges, host_bridge, next); +QLIST_INSERT_HEAD(_host_bridges, phb, next); } PCIBus *pci_find_primary_bus(void) @@ -377,7 +375,7 @@ static void pci_bus_init(PCIBus *bus, DeviceState *parent, /* host bridge */ QLIST_INIT(>child); -pci_host_bus_register(parent); +pci_host_bus_register(PCI_HOST_BRIDGE(host)); } bool pci_bus_is_express(PCIBus *bus) -- 2.11.0.259.g40922b1