Received: from eggs.gnu.org ([2001:4830:134:3::10]:37590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeEy7-0006B9-Vi for qemu-devel@nongnu.org; Tue, 14 Oct 2014 23:09:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeExz-0004s6-A2 for qemu-devel@nongnu.org; Tue, 14 Oct 2014 23:09:43 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49357 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeExz-0004r4-4D for qemu-devel@nongnu.org; Tue, 14 Oct 2014 23:09:35 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 15 Oct 2014 05:09:08 +0200 Message-Id: <1413342561-4754-35-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 34/47] scsi: Cleanup not used anymore SCSIBusInfo{hotplug, hot_unplug} fields 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?= , Paolo Bonzini From: Igor Mammedov SCSI subsytem was converted to hotplug handler API and doesn't use SCSIBusInfo{hotplug, hot_unplug} fields and related callbacks anymore. Signed-off-by: Igor Mammedov Reviewed-by: Paolo Bonzini Signed-off-by: Andreas F=C3=A4rber --- hw/scsi/scsi-bus.c | 16 ---------------- include/hw/scsi/scsi.h | 2 -- 2 files changed, 18 deletions(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index c454331..d33030e 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -208,10 +208,6 @@ static void scsi_qdev_realize(DeviceState *qdev, Err= or **errp) } dev->vmsentry =3D qemu_add_vm_change_state_handler(scsi_dma_restart_= cb, dev); - - if (bus->info->hotplug) { - bus->info->hotplug(bus, dev); - } } =20 static void scsi_qdev_unrealize(DeviceState *qdev, Error **errp) @@ -1943,17 +1939,6 @@ static int get_scsi_requests(QEMUFile *f, void *pv= , size_t size) return 0; } =20 -static int scsi_qdev_unplug(DeviceState *qdev) -{ - SCSIDevice *dev =3D SCSI_DEVICE(qdev); - SCSIBus *bus =3D DO_UPCAST(SCSIBus, qbus, dev->qdev.parent_bus); - - if (bus->info->hot_unplug) { - bus->info->hot_unplug(bus, dev); - } - return qdev_simple_unplug_cb(qdev); -} - static const VMStateInfo vmstate_info_scsi_requests =3D { .name =3D "scsi-requests", .get =3D get_scsi_requests, @@ -2017,7 +2002,6 @@ static void scsi_device_class_init(ObjectClass *kla= ss, void *data) set_bit(DEVICE_CATEGORY_STORAGE, k->categories); k->bus_type =3D TYPE_SCSI_BUS; k->realize =3D scsi_qdev_realize; - k->unplug =3D scsi_qdev_unplug; k->unrealize =3D scsi_qdev_unrealize; k->props =3D scsi_props; } diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h index b61bedb..caaa320 100644 --- a/include/hw/scsi/scsi.h +++ b/include/hw/scsi/scsi.h @@ -146,8 +146,6 @@ struct SCSIBusInfo { void (*transfer_data)(SCSIRequest *req, uint32_t arg); void (*complete)(SCSIRequest *req, uint32_t arg, size_t resid); void (*cancel)(SCSIRequest *req); - void (*hotplug)(SCSIBus *bus, SCSIDevice *dev); - void (*hot_unplug)(SCSIBus *bus, SCSIDevice *dev); void (*change)(SCSIBus *bus, SCSIDevice *dev, SCSISense sense); QEMUSGList *(*get_sg_list)(SCSIRequest *req); =20 --=20 1.8.4.5