mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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>
This commit is contained in:
parent
0c21e07354
commit
d1d32d6255
4 changed files with 16 additions and 40 deletions
|
@ -66,9 +66,7 @@ SpaprOptionVector *spapr_ovec_clone(SpaprOptionVector *ov_orig);
|
|||
void spapr_ovec_intersect(SpaprOptionVector *ov,
|
||||
SpaprOptionVector *ov1,
|
||||
SpaprOptionVector *ov2);
|
||||
bool spapr_ovec_diff(SpaprOptionVector *ov,
|
||||
SpaprOptionVector *ov_old,
|
||||
SpaprOptionVector *ov_new);
|
||||
bool spapr_ovec_subset(SpaprOptionVector *ov1, SpaprOptionVector *ov2);
|
||||
void spapr_ovec_cleanup(SpaprOptionVector *ov);
|
||||
void spapr_ovec_set(SpaprOptionVector *ov, long bitnr);
|
||||
void spapr_ovec_clear(SpaprOptionVector *ov, long bitnr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue