qemu-devel
[Top][All Lists]
Advanced

[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>
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]