spapr: Clean up DRC index construction
commita1ec25b287dd64bdb782061168f8e34552102d48
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 5 Apr 2019 04:51:00 +0000 (5 15:51 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 12 Jun 2019 00:41:49 +0000 (12 10:41 +1000)
treee1a292a55c5f1a744bd327002f411f187397f37e
parent9e7d38e8a304c1b5a03334f3f41cbe157da6b2ad
spapr: Clean up DRC index construction

spapr_pci.c currently has several confusingly similarly named functions for
various conversions between representations of DRCs.  Make things clearer
by renaming things in a more consistent XXX_from_YYY() manner and remove
some called-only-once variants in favour of open coding.

While we're at it, move this code together in the file to avoid some extra
forward references, and split out construction and removal of DRCs for the
host bridge into helper functions.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
hw/ppc/spapr_pci.c