spapr: Simplify ovec diff
commitd1d32d6255a395eb071c10aeffb932a3485bdfcd
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 29 Nov 2019 05:23:21 +0000 (29 16:23 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 16 Dec 2019 23:39:48 +0000 (17 10:39 +1100)
tree8f913032bd9385a5c578fd2bf6416e3f35471694
parent0c21e073541cc093b4cb8744640e24f130e6f8ba
spapr: Simplify ovec diff

spapr_ovec_diff(ov, old, new) has somewhat complex semantics.  ov is set
to those bits which are in new but not old, and it returns as a boolean
whether or not there are any bits in old but not new.

It turns out that both callers only care about the second, not the first.
This is basically equivalent to a bitmap subset operation, which is easier
to understand and implement.  So replace spapr_ovec_diff() with
spapr_ovec_subset().

Cc: Mike Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cedric Le Goater <clg@fr.ibm.com>
hw/ppc/spapr.c
hw/ppc/spapr_hcall.c
hw/ppc/spapr_ovec.c
include/hw/ppc/spapr_ovec.h