From: Igor Mammedov <imammedo@redhat.com>
To: Keqian Zhu <zhukeqian1@huawei.com>
Cc: wanghaibin.wang@huawei.com, qemu-devel@nongnu.org,
Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH] hw/arm: Adjust some coding styles about memory hotplug
Date: Thu, 16 Jan 2020 11:44:35 +0100 [thread overview]
Message-ID: <20200116114435.189402e6@redhat.com> (raw)
In-Reply-To: <20200116074029.45952-1-zhukeqian1@huawei.com>
On Thu, 16 Jan 2020 15:40:29 +0800
Keqian Zhu <zhukeqian1@huawei.com> wrote:
> From: zhukeqian <zhukeqian1@huawei.com>
>
> There is extra indent in ACPI GED plug cb. And we can use
> existing helper function to trigger hotplug handler plug.
>
> Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
> Cc: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> hw/acpi/generic_event_device.c | 2 +-
> hw/arm/virt.c | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> 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)));
> 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);
> }
prev parent reply other threads:[~2020-01-16 10:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 7:40 [PATCH] hw/arm: Adjust some coding styles about memory hotplug Keqian Zhu
2020-01-16 10:44 ` Igor Mammedov [this message]
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=20200116114435.189402e6@redhat.com \
--to=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=wanghaibin.wang@huawei.com \
--cc=zhukeqian1@huawei.com \
/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).