[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] pc-dimm: remove check on pc-dimm hotpluggab
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] pc-dimm: remove check on pc-dimm hotpluggable |
Date: |
Thu, 21 Feb 2019 15:30:21 +0100 |
On Tue, 19 Feb 2019 13:26:47 +0100
Philippe Mathieu-Daudé <address@hidden> wrote:
> On 2/19/19 7:07 AM, Wei Yang wrote:
> > Function acpi_memory_plug_cb() is only invoked when dev is a PCDIMM,
> > which is hotpluggable. This means it is not necessary to check this
> > property again.
> >
> > This patch removes this check.
> >
> > Signed-off-by: Wei Yang <address@hidden>
> > ---
> > hw/acpi/memory_hotplug.c | 4 ----
> > 1 file changed, 4 deletions(-)
> >
> > diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
> > index 8c7c1013f3..b19673d337 100644
> > --- a/hw/acpi/memory_hotplug.c
> > +++ b/hw/acpi/memory_hotplug.c
> > @@ -266,10 +266,6 @@ void acpi_memory_plug_cb(HotplugHandler *hotplug_dev,
> > MemHotplugState *mem_st,
>
> This is also obvious because it takes a HotplugHandler argument.
^^^^
that's a sort of atavism, handler also takes care of coldplug wiring nowdays.
(it's just nobody came up with new name and fixed it up)
>
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
>
> > MemStatus *mdev;
> > DeviceClass *dc = DEVICE_GET_CLASS(dev);
> >
> > - if (!dc->hotpluggable) {
> > - return;
> > - }
> > -
> > mdev = acpi_memory_slot_status(mem_st, dev, errp);
> > if (!mdev) {
> > return;
> >
>