qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] vl.c: make find_default_machine() local


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 1/2] vl.c: make find_default_machine() local
Date: Tue, 02 Apr 2019 08:33:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Wei Yang <address@hidden> writes:

> Function find_default_machine() is introduced by commit 2c8cffa599b7
> "vl: make find_default_machine externally visible", while it seems no
> one outside use it.
It was used outside of vl.c until commit a904410af5f.

> This patch make it local again.

Suggest:

  Commit a904410af5f removed the only user of find_default_machine()
  outside vl.c, but neglected to make it static.  Do that now.

> Signed-off-by: Wei Yang <address@hidden>
> ---
>  include/hw/boards.h | 1 -
>  vl.c                | 4 ++--
>  2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/include/hw/boards.h b/include/hw/boards.h
> index 21212f0859..e911d56c28 100644
> --- a/include/hw/boards.h
> +++ b/include/hw/boards.h
> @@ -57,7 +57,6 @@ void memory_region_allocate_system_memory(MemoryRegion *mr, 
> Object *owner,
>  #define MACHINE_CLASS(klass) \
>      OBJECT_CLASS_CHECK(MachineClass, (klass), TYPE_MACHINE)
>  
> -MachineClass *find_default_machine(void);
>  extern MachineState *current_machine;
>  
>  void machine_run_board_init(MachineState *machine);
> diff --git a/vl.c b/vl.c
> index 502857a176..3688e2bc98 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1441,7 +1441,7 @@ static MachineClass *find_machine(const char *name)
>      return mc;
>  }
>  
> -MachineClass *find_default_machine(void)
> +static MachineClass *find_default_machine(void)
>  {
>      GSList *el, *machines = object_class_get_list(TYPE_MACHINE, false);
>      MachineClass *mc = NULL;
> @@ -2538,7 +2538,7 @@ static gint machine_class_cmp(gconstpointer a, 
> gconstpointer b)
>                    object_class_get_name(OBJECT_CLASS(mc1)));
>  }
>  
> - static MachineClass *machine_parse(const char *name)
> +static MachineClass *machine_parse(const char *name)
>  {
>      MachineClass *mc = NULL;
>      GSList *el, *machines = object_class_get_list(TYPE_MACHINE, false);

Not related to this patch's stated purpose.  Should go into PATCH 2,
where you're changing this line anyway.



reply via email to

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