* [PATCH v3 0/2] Adjust some codes about memory hotplug
@ 2020-01-20 1:27 Keqian Zhu
2020-01-20 1:27 ` [PATCH v3 1/2] hw/acpi: Remove extra indent in ACPI GED hotplug cb Keqian Zhu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Keqian Zhu @ 2020-01-20 1:27 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Michael S . Tsirkin, Shameer Kolothum,
Igor Mammedov, wanghaibin.wang, Keqian Zhu
This removes extra indent and makes some code refactor related to
memory hotplug.
Changelog:
v2 -> v3
- Addressed Peter's comments.
v1 -> v2
- Add Igor's R-b.
Keqian Zhu (2):
hw/acpi: Remove extra indent in ACPI GED hotplug cb
hw/arm: Use helper function to trigger hotplug handler plug
hw/acpi/generic_event_device.c | 2 +-
hw/arm/virt.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
--
2.19.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3 1/2] hw/acpi: Remove extra indent in ACPI GED hotplug cb
2020-01-20 1:27 [PATCH v3 0/2] Adjust some codes about memory hotplug Keqian Zhu
@ 2020-01-20 1:27 ` Keqian Zhu
2020-01-20 1:27 ` [PATCH v3 2/2] hw/arm: Use helper function to trigger hotplug handler plug Keqian Zhu
2020-01-20 14:05 ` [PATCH v3 0/2] Adjust some codes about memory hotplug Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Keqian Zhu @ 2020-01-20 1:27 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Michael S . Tsirkin, Shameer Kolothum,
Igor Mammedov, wanghaibin.wang, Keqian Zhu
There is extra indent in ACPI GED hotplug cb that should be
deleted.
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
---
hw/acpi/generic_event_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
index 9cee90cc70..55eb29d80a 100644
--- a/hw/acpi/generic_event_device.c
+++ b/hw/acpi/generic_event_device.c
@@ -175,7 +175,7 @@ static void acpi_ged_device_plug_cb(HotplugHandler *hotplug_dev,
AcpiGedState *s = ACPI_GED(hotplug_dev);
if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
- acpi_memory_plug_cb(hotplug_dev, &s->memhp_state, dev, errp);
+ acpi_memory_plug_cb(hotplug_dev, &s->memhp_state, dev, errp);
} else {
error_setg(errp, "virt: device plug request for unsupported device"
" type: %s", object_get_typename(OBJECT(dev)));
--
2.19.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v3 2/2] hw/arm: Use helper function to trigger hotplug handler plug
2020-01-20 1:27 [PATCH v3 0/2] Adjust some codes about memory hotplug Keqian Zhu
2020-01-20 1:27 ` [PATCH v3 1/2] hw/acpi: Remove extra indent in ACPI GED hotplug cb Keqian Zhu
@ 2020-01-20 1:27 ` Keqian Zhu
2020-01-20 14:05 ` [PATCH v3 0/2] Adjust some codes about memory hotplug Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Keqian Zhu @ 2020-01-20 1:27 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Michael S . Tsirkin, Shameer Kolothum,
Igor Mammedov, wanghaibin.wang, Keqian Zhu
We can use existing helper function to trigger hotplug handler
plug, which makes code clearer.
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
---
hw/arm/virt.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 39ab5f47e0..656b0081c2 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1934,7 +1934,6 @@ static void virt_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
static void virt_memory_plug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
- HotplugHandlerClass *hhc;
VirtMachineState *vms = VIRT_MACHINE(hotplug_dev);
Error *local_err = NULL;
@@ -1943,8 +1942,9 @@ static void virt_memory_plug(HotplugHandler *hotplug_dev,
goto out;
}
- hhc = HOTPLUG_HANDLER_GET_CLASS(vms->acpi_dev);
- hhc->plug(HOTPLUG_HANDLER(vms->acpi_dev), dev, &error_abort);
+ hotplug_handler_plug(HOTPLUG_HANDLER(vms->acpi_dev),
+ dev, &error_abort);
+
out:
error_propagate(errp, local_err);
}
--
2.19.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 0/2] Adjust some codes about memory hotplug
2020-01-20 1:27 [PATCH v3 0/2] Adjust some codes about memory hotplug Keqian Zhu
2020-01-20 1:27 ` [PATCH v3 1/2] hw/acpi: Remove extra indent in ACPI GED hotplug cb Keqian Zhu
2020-01-20 1:27 ` [PATCH v3 2/2] hw/arm: Use helper function to trigger hotplug handler plug Keqian Zhu
@ 2020-01-20 14:05 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2020-01-20 14:05 UTC (permalink / raw)
To: Keqian Zhu
Cc: wanghaibin.wang, Igor Mammedov, QEMU Developers,
Shameer Kolothum, Michael S . Tsirkin
On Mon, 20 Jan 2020 at 01:30, Keqian Zhu <zhukeqian1@huawei.com> wrote:
>
> This removes extra indent and makes some code refactor related to
> memory hotplug.
>
> Changelog:
>
> v2 -> v3
> - Addressed Peter's comments.
>
> v1 -> v2
> - Add Igor's R-b.
Applied to target-arm.next; thanks for splitting the patch.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-20 14:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20 1:27 [PATCH v3 0/2] Adjust some codes about memory hotplug Keqian Zhu
2020-01-20 1:27 ` [PATCH v3 1/2] hw/acpi: Remove extra indent in ACPI GED hotplug cb Keqian Zhu
2020-01-20 1:27 ` [PATCH v3 2/2] hw/arm: Use helper function to trigger hotplug handler plug Keqian Zhu
2020-01-20 14:05 ` [PATCH v3 0/2] Adjust some codes about memory hotplug Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.