[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v11 12/14] machine: Remove smp_parse callback from MachineCla
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v11 12/14] machine: Remove smp_parse callback from MachineClass |
Date: |
Tue, 28 Sep 2021 12:58:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 |
On 9/28/21 05:57, Yanan Wang wrote:
> Now we have a generic smp parser for all arches, and there will
> not be any other arch specific ones, so let's remove the callback
> from MachineClass and call the parser directly.
>
> Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
> Reviewed-by: Andrew Jones <drjones@redhat.com>
> ---
> hw/core/machine.c | 3 +--
> include/hw/boards.h | 5 -----
> 2 files changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index f5dadcbd78..23f77201eb 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -918,7 +918,7 @@ static void machine_set_smp(Object *obj, Visitor *v,
> const char *name,
> "CPU topology parameters must be greater than zero");
> }
>
> - mc->smp_parse(ms, config, errp);
> + smp_parse(ms, config, errp);
> if (*errp) {
If smp_parse() were to return a boolean, this would become:
if (!smp_parse(ms, config, errp)) {
Regardless:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> goto out_free;
> }
- Re: [PATCH v11 11/14] machine: Make smp_parse generic enough for all arches, (continued)
[PATCH v11 13/14] machine: Move smp_prefer_sockets to struct SMPCompatProps, Yanan Wang, 2021/09/27
[PATCH v11 12/14] machine: Remove smp_parse callback from MachineClass, Yanan Wang, 2021/09/27
[PATCH v11 14/14] machine: Put all sanity-check in the generic SMP parser, Yanan Wang, 2021/09/27
[PATCH v11 04/14] machine: Set the value of cpus to match maxcpus if it's omitted, Yanan Wang, 2021/09/27