aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_pci.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2017-06-02 13:49:20 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2017-06-06 08:53:24 +1000
commit0b55aa91c976b30b527c123fb66d25f5db43d083 (patch)
treea7dbaf524ccba80cbfda61525ba8b59567db20c6 /hw/ppc/spapr_pci.c
parent4f65ce00ab9b059ed1aadc18718760ffd0c60a68 (diff)
spapr: Make DRC get_index and get_type methods into plain functions
These two methods only have one implementation, and the spec they're implementing means any other implementation is unlikely, verging on impossible. So replace them with simple functions. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Tested-by: Daniel Barboza <danielhb@linux.vnet.ibm.com>
Diffstat (limited to 'hw/ppc/spapr_pci.c')
-rw-r--r--hw/ppc/spapr_pci.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index e4daf8d5f1..7a208a720e 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -1417,14 +1417,12 @@ static uint32_t spapr_phb_get_pci_drc_index(sPAPRPHBState *phb,
PCIDevice *pdev)
{
sPAPRDRConnector *drc = spapr_phb_get_pci_drc(phb, pdev);
- sPAPRDRConnectorClass *drck;
if (!drc) {
return 0;
}
- drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
- return drck->get_index(drc);
+ return spapr_drc_index(drc);
}
static void spapr_phb_hot_plug_child(HotplugHandler *plug_handler,