From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeEy2-00060X-6o for qemu-devel@nongnu.org; Tue, 14 Oct 2014 23:09:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeExu-0004nG-Fm for qemu-devel@nongnu.org; Tue, 14 Oct 2014 23:09:38 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49304 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeExu-0004fZ-8z for qemu-devel@nongnu.org; Tue, 14 Oct 2014 23:09:30 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 15 Oct 2014 05:08:57 +0200 Message-Id: <1413342561-4754-24-git-send-email-afaerber@suse.de> In-Reply-To: <1413342561-4754-1-git-send-email-afaerber@suse.de> References: <1413342561-4754-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 23/47] 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: Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= From: Igor Mammedov Check is too restrictive and does not allow to add children 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 check and patch will allow to create complex composite devices during hotplug. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed-off-by: Andreas F=C3=A4rber --- hw/core/qdev.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index b1da409..6439a23 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 =3D g_malloc0(sizeof(*kid)); =20 - if (qdev_hotplug) { - assert(qbus_is_hotpluggable(bus)); - } - kid->index =3D bus->max_index++; kid->child =3D child; object_ref(OBJECT(kid->child)); --=20 1.8.4.5