diff options
author | Greg Kurz <groug@kaod.org> | 2020-08-10 18:54:26 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2020-08-13 21:00:52 +1000 |
commit | 5fa36b7ffbcb2056249929a7b1ee4e30c07dc67c (patch) | |
tree | 281e004db0f1997d2b703f1e2f8ed3f68fc0f842 /include/hw/ppc/xive.h | |
parent | b14adb4a27c80a255fb35451d7cb2bc70743e7f4 (diff) |
spapr/xive: Rework error handling of kvmppc_xive_cpu_[gs]et_state()
kvm_set_one_reg() returns a negative errno on failure, use that instead
of errno. Also propagate it to callers so they can use it to check
for failures and hopefully get rid of their local_err boilerplate.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <159707846665.1489912.14267225652103441921.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/ppc/xive.h')
-rw-r--r-- | include/hw/ppc/xive.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h index 2d87ed4372..785c905357 100644 --- a/include/hw/ppc/xive.h +++ b/include/hw/ppc/xive.h @@ -489,7 +489,7 @@ int kvmppc_xive_source_reset_one(XiveSource *xsrc, int srcno, Error **errp); void kvmppc_xive_source_set_irq(void *opaque, int srcno, int val); int kvmppc_xive_cpu_connect(XiveTCTX *tctx, Error **errp); void kvmppc_xive_cpu_synchronize_state(XiveTCTX *tctx, Error **errp); -void kvmppc_xive_cpu_get_state(XiveTCTX *tctx, Error **errp); -void kvmppc_xive_cpu_set_state(XiveTCTX *tctx, Error **errp); +int kvmppc_xive_cpu_get_state(XiveTCTX *tctx, Error **errp); +int kvmppc_xive_cpu_set_state(XiveTCTX *tctx, Error **errp); #endif /* PPC_XIVE_H */ |