Received: from eggs.gnu.org ([209.51.188.92]:54996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gw539-0005ph-F8 for qemu-devel@nongnu.org; Tue, 19 Feb 2019 08:03:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gw538-0006A0-Gs for qemu-devel@nongnu.org; Tue, 19 Feb 2019 08:03:03 -0500 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]:39939) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gw538-00065t-93 for qemu-devel@nongnu.org; Tue, 19 Feb 2019 08:03:02 -0500 Received: by mail-ed1-x544.google.com with SMTP id 10so16642470eds.7 for ; Tue, 19 Feb 2019 05:02:58 -0800 (PST) Date: Tue, 19 Feb 2019 13:02:55 +0000 From: Wei Yang Message-ID: <20190219130255.yjxmge3uz754h3fr@master> Reply-To: Wei Yang References: <20190219060719.8211-1-richardw.yang@linux.intel.com> <20190219060719.8211-2-richardw.yang@linux.intel.com> <44d5032e-7271-3779-c7e2-d0edd3e1c7fb@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <44d5032e-7271-3779-c7e2-d0edd3e1c7fb@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/2] pc-dimm: remove check on pc-dimm hotpluggable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= Cc: Wei Yang , qemu-devel@nongnu.org, imammedo@redhat.com, xiaoguangrong.eric@gmail.com, mst@redhat.com On Tue, Feb 19, 2019 at 01:29:38PM +0100, Philippe Mathieu-Daudé 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 >> --- >> 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, >> MemStatus *mdev; >> DeviceClass *dc = DEVICE_GET_CLASS(dev); > >You have to remove the 'dc' variable now: > > CC hw/acpi/memory_hotplug.o >hw/acpi/memory_hotplug.c: In function ‘acpi_memory_plug_cb’: >hw/acpi/memory_hotplug.c:267:18: error: unused variable ‘dc’ >[-Werror=unused-variable] > DeviceClass *dc = DEVICE_GET_CLASS(dev); > ^~ Thanks, I didn't notice this warning. > >Once removed: >Tested-by: Philippe Mathieu-Daudé > >> >> - if (!dc->hotpluggable) { >> - return; >> - } >> - >> mdev = acpi_memory_slot_status(mem_st, dev, errp); >> if (!mdev) { >> return; >> -- Wei Yang Help you, Help me