[Top][All Lists]

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

[Qemu-devel] [PATCH 2/7] exynos4: Use MachineClass instead of exynos4_ma

From: Eduardo Habkost
Subject: [Qemu-devel] [PATCH 2/7] exynos4: Use MachineClass instead of exynos4_machines array
Date: Tue, 18 Aug 2015 12:08:49 -0700

We don't need a QEMUMachine array to query max_cpus, if we can get the
corresponding MachineClass.

Cc: Peter Maydell <address@hidden>
Cc: Evgeny Voevodin <address@hidden>
Cc: Maksim Kozlov <address@hidden>
Cc: Igor Mitsyanko <address@hidden>
Cc: Dmitry Solodkiy <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
 hw/arm/exynos4_boards.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
index 3f88c4a..312a014 100644
--- a/hw/arm/exynos4_boards.c
+++ b/hw/arm/exynos4_boards.c
@@ -97,10 +97,12 @@ static void lan9215_init(uint32_t base, qemu_irq irq)
 static Exynos4210State *exynos4_boards_init_common(MachineState *machine,
                                                    Exynos4BoardType board_type)
+    MachineClass *mc = MACHINE_GET_CLASS(machine);
     if (smp_cpus != EXYNOS4210_NCPUS && !qtest_enabled()) {
         fprintf(stderr, "%s board supports only %d CPU cores. Ignoring 
                 " value.\n",
-                exynos4_machines[board_type].name, EXYNOS4210_NCPUS);
+                mc->name, EXYNOS4210_NCPUS);
     exynos4_board_binfo.ram_size = exynos4_board_ram_size[board_type];

reply via email to

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