[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 02/15] ppc: Add a return value to ppc_set_compat() and ppc_se
From: |
Greg Kurz |
Subject: |
Re: [PATCH 02/15] ppc: Add a return value to ppc_set_compat() and ppc_set_compat_all() |
Date: |
Tue, 15 Sep 2020 11:34:42 +0200 |
On Tue, 15 Sep 2020 12:18:35 +0300
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> wrote:
> 14.09.2020 15:34, Greg Kurz wrote:
> > As recommended in "qapi/error.h", indicate success / failure with a
> > return value. Since ppc_set_compat() is called from a VMState handler,
>
> What handler do you mean? You don't update any handlers here..
>
One of the callers of ppc_set_compat() is
static int cpu_post_load(void *opaque, int version_id)
{
}
in target/ppc/machine.c, which gets fixed in patch 3. I mention this to
justify the choice of an int rather than a bool.
> > let's make it an int so that it propagates any negative errno returned
> > by kvmppc_set_compat(). Do the same for ppc_set_compat_all() for
> > consistency, even if it isn't called in a context where a negative errno
> > is required on failure.
> >
> > This will allow to simplify error handling in the callers.
> >
> > Signed-off-by: Greg Kurz <groug@kaod.org>
>
> patch is OK:
> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>
- [PATCH 00/15] spapr: Error handling fixes and cleanups (round 2), Greg Kurz, 2020/09/14
- [PATCH 01/15] spapr: Fix error leak in spapr_realize_vcpu(), Greg Kurz, 2020/09/14
- [PATCH 02/15] ppc: Add a return value to ppc_set_compat() and ppc_set_compat_all(), Greg Kurz, 2020/09/14
- [PATCH 04/15] spapr: Simplify error handling in callers of ppc_set_compat(), Greg Kurz, 2020/09/14
- [PATCH 03/15] ppc: Fix return value in cpu_post_load() error path, Greg Kurz, 2020/09/14
- [PATCH 05/15] spapr: Get rid of cas_check_pvr() error reporting, Greg Kurz, 2020/09/14
- [PATCH 07/15] spapr: Simplify error handling in spapr_vio_busdev_realize(), Greg Kurz, 2020/09/14