[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 13/14] ppc/xive: Simplify error handling in xive_tctx_realize
From: |
David Gibson |
Subject: |
Re: [PATCH 13/14] ppc/xive: Simplify error handling in xive_tctx_realize() |
Date: |
Thu, 13 Aug 2020 21:07:38 +1000 |
On Mon, Aug 10, 2020 at 06:55:22PM +0200, Greg Kurz wrote:
> Now that kvmppc_xive_cpu_connect() returns a negative errno on failure,
> use that and get rid of the local_err boilerplate.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
Applied to ppc-for-5.2
> ---
> hw/intc/xive.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/hw/intc/xive.c b/hw/intc/xive.c
> index 17ca5a1916b4..489e6256ef70 100644
> --- a/hw/intc/xive.c
> +++ b/hw/intc/xive.c
> @@ -662,7 +662,6 @@ static void xive_tctx_realize(DeviceState *dev, Error
> **errp)
> XiveTCTX *tctx = XIVE_TCTX(dev);
> PowerPCCPU *cpu;
> CPUPPCState *env;
> - Error *local_err = NULL;
>
> assert(tctx->cs);
> assert(tctx->xptr);
> @@ -683,9 +682,7 @@ static void xive_tctx_realize(DeviceState *dev, Error
> **errp)
>
> /* Connect the presenter to the VCPU (required for CPU hotplug) */
> if (xive_in_kernel(tctx->xptr)) {
> - kvmppc_xive_cpu_connect(tctx, &local_err);
> - if (local_err) {
> - error_propagate(errp, local_err);
> + if (kvmppc_xive_cpu_connect(tctx, errp) < 0) {
> return;
> }
> }
>
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- Re: [PATCH 08/14] spapr/xive: Rework error handling of kvmppc_xive_set_source_config(), (continued)
- [PATCH 09/14] spapr/kvm: Fix error handling in kvmppc_xive_pre_save(), Greg Kurz, 2020/08/10
- [PATCH 10/14] spapr/xive: Fix error handling in kvmppc_xive_post_load(), Greg Kurz, 2020/08/10
- [PATCH 11/14] ppc/xive: Fix error handling in vmstate_xive_tctx_*() callbacks, Greg Kurz, 2020/08/10
- [PATCH 12/14] spapr/xive: Simplify error handling in kvmppc_xive_connect(), Greg Kurz, 2020/08/10
- [PATCH 13/14] ppc/xive: Simplify error handling in xive_tctx_realize(), Greg Kurz, 2020/08/10
- Re: [PATCH 13/14] ppc/xive: Simplify error handling in xive_tctx_realize(),
David Gibson <=
- [PATCH 14/14] spapr/xive: Simplify error handling of kvmppc_xive_cpu_synchronize_state(), Greg Kurz, 2020/08/10