[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/15] hw/core/machine-qmp-cmds: Replace current_machine by qdev_
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 07/15] hw/core/machine-qmp-cmds: Replace current_machine by qdev_get_machine() |
Date: |
Thu, 9 Jan 2020 16:21:25 +0100 |
As we want to remove the global current_machine,
replace MACHINE_GET_CLASS(current_machine) by
MACHINE_GET_CLASS(qdev_get_machine()).
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/core/machine-qmp-cmds.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
index eed5aeb2f7..5a04d00e4f 100644
--- a/hw/core/machine-qmp-cmds.c
+++ b/hw/core/machine-qmp-cmds.c
@@ -280,9 +280,9 @@ void qmp_cpu_add(int64_t id, Error **errp)
{
MachineClass *mc;
- mc = MACHINE_GET_CLASS(current_machine);
+ mc = MACHINE_GET_CLASS(qdev_get_machine());
if (mc->hot_add_cpu) {
- mc->hot_add_cpu(current_machine, id, errp);
+ mc->hot_add_cpu(MACHINE(qdev_get_machine()), id, errp);
} else {
error_setg(errp, "Not supported");
}
--
2.21.1
- Re: [PATCH 04/15] hw/ppc/spapr_rtas: Restrict variables scope to single switch case, (continued)
[PATCH 05/15] device-hotplug: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
[PATCH 06/15] migration/savevm: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
[PATCH 07/15] hw/core/machine-qmp-cmds: Replace current_machine by qdev_get_machine(),
Philippe Mathieu-Daudé <=
[PATCH 08/15] target/arm/monitor: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
[PATCH 09/15] device_tree: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
[PATCH 10/15] memory: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
[PATCH 11/15] exec: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09