From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXRqa-0001lg-7P for qemu-devel@nongnu.org; Fri, 26 Sep 2014 05:29:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXRqU-0007fA-3h for qemu-devel@nongnu.org; Fri, 26 Sep 2014 05:29:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXRqT-0007eA-T1 for qemu-devel@nongnu.org; Fri, 26 Sep 2014 05:29:46 -0400 From: Igor Mammedov Date: Fri, 26 Sep 2014 09:28:23 +0000 Message-Id: <1411723721-20484-19-git-send-email-imammedo@redhat.com> In-Reply-To: <1411723721-20484-1-git-send-email-imammedo@redhat.com> References: <1411723721-20484-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH v2 18/36] qdev: drop hotplug check from bus_add_child() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: cornelia.huck@de.ibm.com, mst@redhat.com, amit.shah@redhat.com, agraf@suse.de, borntraeger@de.ibm.com, kraxel@redhat.com, dmitry@daynix.com, pbonzini@redhat.com, rth@twiddle.net check is too restrictive and does not allow to add childs to just created bus during hotplug when the bus is part of composite device. Removing check from bus_add_child() doesn't affect devices creatable with device_add/del commands since they have a similar builtin checks and patch will allow to create complex composite devices during hotplug. Signed-off-by: Igor Mammedov --- hw/core/qdev.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 0de99b2..fa86843 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -85,10 +85,6 @@ static void bus_add_child(BusState *bus, DeviceState *child) char name[32]; BusChild *kid = g_malloc0(sizeof(*kid)); - if (qdev_hotplug) { - assert(qbus_is_hotpluggable(bus)); - } - kid->index = bus->max_index++; kid->child = child; object_ref(OBJECT(kid->child)); -- 1.8.3.1