qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/3] hw: Make MachineClass::is_default a boolean type


From: Michael S. Tsirkin
Subject: Re: [PATCH v3 2/3] hw: Make MachineClass::is_default a boolean type
Date: Fri, 7 Feb 2020 09:25:16 -0500

On Fri, Feb 07, 2020 at 03:22:19PM +0100, Laurent Vivier wrote:
> Le 07/02/2020 à 15:11, Michael S. Tsirkin a écrit :
> > On Fri, Feb 07, 2020 at 02:04:52PM +0100, Philippe Mathieu-Daudé wrote:
> >> There's no good reason for it to be type int, change it to bool.
> >>
> >> Suggested-by: Richard Henderson <address@hidden>
> >> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> > 
> > Reviewed-by: Michael S. Tsirkin <address@hidden>
> > 
> >> ---
> >> v3: new patch
> >> ---
> >>  include/hw/boards.h                      |  2 +-
> >>  hw/alpha/dp264.c                         |  2 +-
> >>  hw/cris/axis_dev88.c                     |  2 +-
> >>  hw/hppa/machine.c                        |  2 +-
> >>  hw/i386/pc_piix.c                        | 10 +++++-----
> >>  hw/lm32/lm32_boards.c                    |  2 +-
> >>  hw/m68k/mcf5208.c                        |  2 +-
> >>  hw/microblaze/petalogix_s3adsp1800_mmu.c |  2 +-
> >>  hw/mips/mips_malta.c                     |  2 +-
> >>  hw/moxie/moxiesim.c                      |  2 +-
> >>  hw/nios2/10m50_devboard.c                |  2 +-
> >>  hw/openrisc/openrisc_sim.c               |  2 +-
> >>  hw/ppc/mac_oldworld.c                    |  2 +-
> >>  hw/ppc/spapr.c                           |  2 +-
> >>  hw/riscv/spike.c                         |  2 +-
> >>  hw/s390x/s390-virtio-ccw.c               |  2 +-
> >>  hw/sh4/shix.c                            |  2 +-
> >>  hw/sparc/sun4m.c                         |  2 +-
> >>  hw/sparc64/niagara.c                     |  2 +-
> >>  hw/sparc64/sun4u.c                       |  4 ++--
> >>  hw/unicore32/puv3.c                      |  2 +-
> >>  21 files changed, 26 insertions(+), 26 deletions(-)
> >>
> ...
> >> diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
> >> index 5eb2d097b9..81a1748fad 100644
> >> --- a/hw/sparc64/niagara.c
> >> +++ b/hw/sparc64/niagara.c
> >> @@ -170,7 +170,7 @@ static void niagara_class_init(ObjectClass *oc, void 
> >> *data)
> >>  
> >>      mc->desc = "Sun4v platform, Niagara";
> >>      mc->init = niagara_init;
> >> -    mc->max_cpus = 1; /* XXX for now */
> >> +    mc->max_cpus = true; /* XXX for now */
> 
> what happened here ^^^
> 
> >>      mc->default_boot_order = "c";
> >>      mc->default_cpu_type = SPARC_CPU_TYPE_NAME("Sun-UltraSparc-T1");
> >>  }
> >> diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
> >> index b7ac42f7a5..3c2c9d2eb0 100644
> >> --- a/hw/sparc64/sun4u.c
> >> +++ b/hw/sparc64/sun4u.c
> >> @@ -816,7 +816,7 @@ static void sun4u_class_init(ObjectClass *oc, void 
> >> *data)
> >>      mc->init = sun4u_init;
> >>      mc->block_default_type = IF_IDE;
> >>      mc->max_cpus = 1; /* XXX for now */
> >> -    mc->is_default = 1;
> >> +    mc->is_default = true;
> >>      mc->default_boot_order = "c";
> >>      mc->default_cpu_type = SPARC_CPU_TYPE_NAME("TI-UltraSparc-IIi");
> >>      mc->ignore_boot_device_suffixes = true;
> >> @@ -841,7 +841,7 @@ static void sun4v_class_init(ObjectClass *oc, void 
> >> *data)
> >>      mc->desc = "Sun4v platform";
> >>      mc->init = sun4v_init;
> >>      mc->block_default_type = IF_IDE;
> >> -    mc->max_cpus = 1; /* XXX for now */
> >> +    mc->max_cpus = true; /* XXX for now */
> 
> and here ^^
> 
> Thanks,
> Laurent

Ooh good catch. Which probably means we don't have a unit test for these
...




reply via email to

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