qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Evgeny Voevodin" <e.voevodin@samsung.com>,
	"Marcel Apfelbaum" <marcel.a@redhat.com>,
	"Igor Mitsyanko" <i.mitsyanko@gmail.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Dmitry Solodkiy" <d.solodkiy@samsung.com>,
	"Maksim Kozlov" <m.kozlov@samsung.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH v3 3/7] exynos4: Declare each QEMUMachine as a separate variable
Date: Fri,  4 Sep 2015 15:37:05 -0300	[thread overview]
Message-ID: <1441391829-28017-4-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1441391829-28017-1-git-send-email-ehabkost@redhat.com>

This will make the code follow the same pattern used for other machines,
and will make it easier to automatically convert the code to be
QOM-based.

Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Evgeny Voevodin <e.voevodin@samsung.com>
Cc: Maksim Kozlov <m.kozlov@samsung.com>
Cc: Igor Mitsyanko <i.mitsyanko@gmail.com>
Cc: Dmitry Solodkiy <d.solodkiy@samsung.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 hw/arm/exynos4_boards.c | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
index 312a014..35fc7c4 100644
--- a/hw/arm/exynos4_boards.c
+++ b/hw/arm/exynos4_boards.c
@@ -74,8 +74,6 @@ static struct arm_boot_info exynos4_board_binfo = {
     .write_secondary_boot = exynos4210_write_secondary,
 };
 
-static QEMUMachine exynos4_machines[EXYNOS4_NUM_OF_BOARDS];
-
 static void lan9215_init(uint32_t base, qemu_irq irq)
 {
     DeviceState *dev;
@@ -146,25 +144,24 @@ static void smdkc210_init(MachineState *machine)
     arm_load_kernel(ARM_CPU(first_cpu), &exynos4_board_binfo);
 }
 
-static QEMUMachine exynos4_machines[EXYNOS4_NUM_OF_BOARDS] = {
-    [EXYNOS4_BOARD_NURI] = {
-        .name = "nuri",
-        .desc = "Samsung NURI board (Exynos4210)",
-        .init = nuri_init,
-        .max_cpus = EXYNOS4210_NCPUS,
-    },
-    [EXYNOS4_BOARD_SMDKC210] = {
-        .name = "smdkc210",
-        .desc = "Samsung SMDKC210 board (Exynos4210)",
-        .init = smdkc210_init,
-        .max_cpus = EXYNOS4210_NCPUS,
-    },
+static QEMUMachine exynos4_machine_nuri = {
+    .name = "nuri",
+    .desc = "Samsung NURI board (Exynos4210)",
+    .init = nuri_init,
+    .max_cpus = EXYNOS4210_NCPUS,
+};
+
+static QEMUMachine exynos4_machine_smdkc210 = {
+    .name = "smdkc210",
+    .desc = "Samsung SMDKC210 board (Exynos4210)",
+    .init = smdkc210_init,
+    .max_cpus = EXYNOS4210_NCPUS,
 };
 
 static void exynos4_machine_init(void)
 {
-    qemu_register_machine(&exynos4_machines[EXYNOS4_BOARD_NURI]);
-    qemu_register_machine(&exynos4_machines[EXYNOS4_BOARD_SMDKC210]);
+    qemu_register_machine(&exynos4_machine_nuri);
+    qemu_register_machine(&exynos4_machine_smdkc210);
 }
 
 machine_init(exynos4_machine_init);
-- 
2.1.0

  parent reply	other threads:[~2015-09-04 18:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-04 18:37 [Qemu-devel] [PATCH v3 0/7] machine registration: Use QOM, eliminate QEMUMachine Eduardo Habkost
2015-09-04 18:37 ` [Qemu-devel] [PATCH v3 1/7] exynos4: Use EXYNOS4210_NCPUS instead of max_cpus on error message Eduardo Habkost
2015-09-04 18:37 ` [Qemu-devel] [PATCH v3 2/7] exynos4: Use MachineClass instead of exynos4_machines array Eduardo Habkost
2015-09-04 18:37 ` Eduardo Habkost [this message]
2015-09-04 18:37 ` [Qemu-devel] [PATCH v3 4/7] machine: DEFINE_MACHINE macro Eduardo Habkost
2015-09-04 18:37 ` [Qemu-devel] [PATCH v3 5/7] mac_world: Break long line Eduardo Habkost
2015-09-04 18:37 ` [Qemu-devel] [PATCH v3 6/7] Use DEFINE_MACHINE to register all machines Eduardo Habkost
2015-09-19  8:13   ` Andreas Färber
2015-09-19  8:27     ` Andreas Färber
2015-09-19  8:28       ` Andreas Färber
2015-09-21 15:10     ` Eduardo Habkost
2015-09-19 12:19   ` [Qemu-devel] [PATCH 6a/7] Revert use of DEFINE_MACHINE() for registrations of multiple machines Andreas Färber
2015-09-04 18:37 ` [Qemu-devel] [PATCH v3 7/7] machine: Eliminate QEMUMachine and qemu_register_machine() Eduardo Habkost
2015-09-19 16:21 ` [Qemu-devel] [PATCH v3 0/7] machine registration: Use QOM, eliminate QEMUMachine Andreas Färber

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=1441391829-28017-4-git-send-email-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=afaerber@suse.de \
    --cc=d.solodkiy@samsung.com \
    --cc=e.voevodin@samsung.com \
    --cc=i.mitsyanko@gmail.com \
    --cc=m.kozlov@samsung.com \
    --cc=marcel.a@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).