kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alistair Francis <alistair23@gmail.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Peter Maydell <peter.maydell@linaro.org>,
	Eduardo Habkost <ehabkost@redhat.com>,
	"open list:Overall" <kvm@vger.kernel.org>,
	Juan Quintela <quintela@redhat.com>,
	"open list:New World" <qemu-ppc@nongnu.org>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	qemu-arm <qemu-arm@nongnu.org>,
	Alistair Francis <alistair.francis@wdc.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH 15/15] vl: Make current_machine a local variable
Date: Tue, 14 Jan 2020 12:00:30 +1000	[thread overview]
Message-ID: <CAKmqyKPZ-=Njnv9KhS7yN_UE_Cij_eD=uUxdKhB5r8+dddiCyg@mail.gmail.com> (raw)
In-Reply-To: <20200109152133.23649-16-philmd@redhat.com>

On Fri, Jan 10, 2020 at 1:34 AM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> Since we now only use current_machine in vl.c, stop exporting
> it as a global variable in "hw/board.h", and make it static
> to vl.c.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  include/hw/boards.h | 2 --
>  vl.c                | 4 ++--
>  2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/include/hw/boards.h b/include/hw/boards.h
> index 61f8bb8e5a..b0c0d4376d 100644
> --- a/include/hw/boards.h
> +++ b/include/hw/boards.h
> @@ -59,8 +59,6 @@ void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner,
>  #define MACHINE_CLASS(klass) \
>      OBJECT_CLASS_CHECK(MachineClass, (klass), TYPE_MACHINE)
>
> -extern MachineState *current_machine;
> -
>  void machine_run_board_init(MachineState *machine);
>  bool machine_usb(MachineState *machine);
>  int machine_phandle_start(MachineState *machine);
> diff --git a/vl.c b/vl.c
> index 3ff3548183..7a69af4bef 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -214,6 +214,8 @@ static int default_sdcard = 1;
>  static int default_vga = 1;
>  static int default_net = 1;
>
> +static MachineState *current_machine;
> +
>  static struct {
>      const char *driver;
>      int *flag;
> @@ -1164,8 +1166,6 @@ static int usb_parse(const char *cmdline)
>  /***********************************************************/
>  /* machine registration */
>
> -MachineState *current_machine;
> -
>  static MachineClass *find_machine(const char *name, GSList *machines)
>  {
>      GSList *el;
> --
> 2.21.1
>
>

  reply	other threads:[~2020-01-14  2:00 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09 15:21 [PATCH 00/15] Replace current_machine by qdev_get_machine() Philippe Mathieu-Daudé
2020-01-09 15:21 ` [PATCH 01/15] target/arm/kvm: Use CPUState::kvm_state in kvm_arm_pmu_supported() Philippe Mathieu-Daudé
2020-01-10  9:59   ` Alistair Francis
2020-01-09 15:21 ` [PATCH 02/15] hw/ppc/spapr_rtas: Use local MachineState variable Philippe Mathieu-Daudé
2020-01-09 17:13   ` Greg Kurz
2020-01-13  1:11   ` David Gibson
2020-01-09 15:21 ` [PATCH 03/15] hw/ppc/spapr_rtas: Access MachineState via SpaprMachineState argument Philippe Mathieu-Daudé
2020-01-09 17:13   ` Greg Kurz
2020-01-13  1:11   ` David Gibson
2020-01-09 15:21 ` [PATCH 04/15] hw/ppc/spapr_rtas: Restrict variables scope to single switch case Philippe Mathieu-Daudé
2020-01-09 17:43   ` Greg Kurz
2020-01-10  9:34     ` Philippe Mathieu-Daudé
2020-01-10  9:50       ` Greg Kurz
2020-01-10 19:18         ` Eric Blake
2020-01-13  7:16         ` David Gibson
2020-01-09 15:21 ` [PATCH 05/15] device-hotplug: Replace current_machine by qdev_get_machine() Philippe Mathieu-Daudé
2020-01-12  9:42   ` Alistair Francis
2020-01-09 15:21 ` [PATCH 06/15] migration/savevm: " Philippe Mathieu-Daudé
2020-01-09 15:52   ` Dr. David Alan Gilbert
2020-01-12  9:43   ` Alistair Francis
2020-01-14 13:27   ` Juan Quintela
2020-01-09 15:21 ` [PATCH 07/15] hw/core/machine-qmp-cmds: " Philippe Mathieu-Daudé
2020-01-12  9:44   ` Alistair Francis
2020-01-09 15:21 ` [PATCH 08/15] target/arm/monitor: " Philippe Mathieu-Daudé
2020-01-12  9:47   ` Alistair Francis
2020-01-09 15:21 ` [PATCH 09/15] device_tree: " Philippe Mathieu-Daudé
2020-01-12  9:47   ` Alistair Francis
2020-01-09 15:21 ` [PATCH 10/15] memory: " Philippe Mathieu-Daudé
2020-01-12  9:48   ` Alistair Francis
2020-01-12 13:45     ` Philippe Mathieu-Daudé
2020-01-14  2:02       ` Alistair Francis
2020-01-09 15:21 ` [PATCH 11/15] exec: " Philippe Mathieu-Daudé
2020-01-14  1:57   ` Alistair Francis
2020-01-09 15:21 ` [PATCH 12/15] accel: Introduce the current_accel() method Philippe Mathieu-Daudé
2020-01-14  1:59   ` Alistair Francis
2020-01-09 15:21 ` [PATCH 13/15] accel: Replace current_machine->accelerator by " Philippe Mathieu-Daudé
2020-01-14  1:58   ` Alistair Francis
2020-01-09 15:21 ` [PATCH 14/15] accel/accel: Replace current_machine by qdev_get_machine() Philippe Mathieu-Daudé
2020-01-14  1:59   ` Alistair Francis
2020-01-09 15:21 ` [PATCH 15/15] vl: Make current_machine a local variable Philippe Mathieu-Daudé
2020-01-14  2:00   ` Alistair Francis [this message]
2020-01-21  8:59 ` [PATCH 00/15] Replace current_machine by qdev_get_machine() Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKmqyKPZ-=Njnv9KhS7yN_UE_Cij_eD=uUxdKhB5r8+dddiCyg@mail.gmail.com' \
    --to=alistair23@gmail.com \
    --cc=alistair.francis@wdc.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).