[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 10/15] spapr: Add a return value to spapr_set_vcpu_id()
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 10/15] spapr: Add a return value to spapr_set_vcpu_id() |
Date: |
Tue, 15 Sep 2020 15:08:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 9/14/20 2:35 PM, Greg Kurz wrote:
> As recommended in "qapi/error.h", return true on success and false on
> failure. This allows to reduce error propagation overhead in the callers.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> include/hw/ppc/spapr.h | 2 +-
> hw/ppc/spapr.c | 5 +++--
> hw/ppc/spapr_cpu_core.c | 5 +----
> 3 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
> index c8cd63bc0667..11682f00e8cc 100644
> --- a/include/hw/ppc/spapr.h
> +++ b/include/hw/ppc/spapr.h
> @@ -909,7 +909,7 @@ void spapr_do_system_reset_on_cpu(CPUState *cs,
> run_on_cpu_data arg);
> #define HTAB_SIZE(spapr) (1ULL << ((spapr)->htab_shift))
>
> int spapr_get_vcpu_id(PowerPCCPU *cpu);
> -void spapr_set_vcpu_id(PowerPCCPU *cpu, int cpu_index, Error **errp);
> +bool spapr_set_vcpu_id(PowerPCCPU *cpu, int cpu_index, Error **errp);
If you have to respin, please add some doc, at least this would
be an improvement:
/* Returns: %true on success, %false on error. */
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>