From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8oWC-0000O0-3q for qemu-devel@nongnu.org; Wed, 18 Apr 2018 10:57:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8oWB-0005FJ-1I for qemu-devel@nongnu.org; Wed, 18 Apr 2018 10:57:08 -0400 Date: Wed, 18 Apr 2018 11:56:03 -0300 From: Eduardo Habkost Message-ID: <20180418145603.GN29865@localhost.localdomain> References: <1524061685-83305-1-git-send-email-imammedo@redhat.com> <1524061685-83305-4-git-send-email-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1524061685-83305-4-git-send-email-imammedo@redhat.com> Subject: Re: [Qemu-devel] [PATCH for-2.13 v2 3/5] pc: simplify MachineClass::get_hotplug_handler handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org, peter.maydell@linaro.org, eric.auger@redhat.com, mst@redhat.com On Wed, Apr 18, 2018 at 04:28:03PM +0200, Igor Mammedov wrote: > By default MachineClass::get_hotplug_handler is NULL and concrete board > should set it to it's own handler. > Considering there isn't any default handler, drop saving empty > MachineClass::get_hotplug_handler in child class and make PC code > consistent with spapr/s390x boards. > > We can bring this back when actual usecase surfaces and do it > consistently across boards that use get_hotplug_handler(). > > Suggested-by: David Gibson > Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost [...] > @@ -2344,7 +2341,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) > HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc); > NMIClass *nc = NMI_CLASS(oc); > > - pcmc->get_hotplug_handler = mc->get_hotplug_handler; What about assert(!mc->get_hotplug_handler) just before overwriting it? -- Eduardo