spapr: Refactor spapr_drc_detach()
commita8dc47fd8249cca45f6314bfd8cf195dc3fbd36b
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 4 Jul 2017 11:07:14 +0000 (4 21:07 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 17 Jul 2017 05:07:05 +0000 (17 15:07 +1000)
tree342ee6f852a3984bb14f779885da2eeda02f7658
parentba50822ff835c197563423b688afc6d0fe50f7d0
spapr: Refactor spapr_drc_detach()

This function has two unused parameters - remove them.

It also sets awaiting_release on all paths, except one.  On that path
setting it is harmless, since it will be immediately cleared by
spapr_drc_release().  So factor it out of the if statements.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Tested-by: Daniel Barboza <danielhb@linux.vnet.ibm.com>
hw/ppc/spapr.c
hw/ppc/spapr_drc.c
hw/ppc/spapr_pci.c
include/hw/ppc/spapr_drc.h