From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeEy6-00068y-NL for qemu-devel@nongnu.org; Tue, 14 Oct 2014 23:09:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeExw-0004p6-2e for qemu-devel@nongnu.org; Tue, 14 Oct 2014 23:09:42 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49332 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeExv-0004mK-So for qemu-devel@nongnu.org; Tue, 14 Oct 2014 23:09:32 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 15 Oct 2014 05:09:01 +0200 Message-Id: <1413342561-4754-28-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 27/47] virtio-mmio: Drop useless bus->allow_hotplug = 0 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?= , Anthony Liguori , "Michael S. Tsirkin" From: Igor Mammedov Bus by default is not hotpluggable. virtio-mmio-bus and its parent types do not set allow_hotplug anywhere explicitly, so remove not needed field access and wrapper along with it. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Andreas F=C3=A4rber --- hw/virtio/virtio-mmio.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 18c6e5b..2450c13 100644 --- a/hw/virtio/virtio-mmio.c +++ b/hw/virtio/virtio-mmio.c @@ -89,9 +89,6 @@ typedef struct { VirtioBusState bus; } VirtIOMMIOProxy; =20 -static void virtio_mmio_bus_new(VirtioBusState *bus, size_t bus_size, - VirtIOMMIOProxy *dev); - static uint64_t virtio_mmio_read(void *opaque, hwaddr offset, unsigned s= ize) { VirtIOMMIOProxy *proxy =3D (VirtIOMMIOProxy *)opaque; @@ -362,7 +359,8 @@ static void virtio_mmio_realizefn(DeviceState *d, Err= or **errp) VirtIOMMIOProxy *proxy =3D VIRTIO_MMIO(d); SysBusDevice *sbd =3D SYS_BUS_DEVICE(d); =20 - virtio_mmio_bus_new(&proxy->bus, sizeof(proxy->bus), proxy); + qbus_create_inplace(&proxy->bus, sizeof(proxy->bus), TYPE_VIRTIO_MMI= O_BUS, + d, NULL); sysbus_init_irq(sbd, &proxy->irq); memory_region_init_io(&proxy->iomem, OBJECT(d), &virtio_mem_ops, pro= xy, TYPE_VIRTIO_MMIO, 0x200); @@ -393,17 +391,6 @@ static const TypeInfo virtio_mmio_info =3D { =20 /* virtio-mmio-bus. */ =20 -static void virtio_mmio_bus_new(VirtioBusState *bus, size_t bus_size, - VirtIOMMIOProxy *dev) -{ - DeviceState *qdev =3D DEVICE(dev); - BusState *qbus; - - qbus_create_inplace(bus, bus_size, TYPE_VIRTIO_MMIO_BUS, qdev, NULL)= ; - qbus =3D BUS(bus); - qbus->allow_hotplug =3D 0; -} - static void virtio_mmio_bus_class_init(ObjectClass *klass, void *data) { BusClass *bus_class =3D BUS_CLASS(klass); --=20 1.8.4.5