From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWlR7-0005gM-LY for qemu-devel@nongnu.org; Wed, 24 Sep 2014 08:12:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWlR1-000452-HN for qemu-devel@nongnu.org; Wed, 24 Sep 2014 08:12:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWlR1-00044O-6u for qemu-devel@nongnu.org; Wed, 24 Sep 2014 08:12:39 -0400 Message-ID: <5422B527.4000305@redhat.com> Date: Wed, 24 Sep 2014 14:12:23 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1411559299-19042-1-git-send-email-imammedo@redhat.com> <1411559299-19042-25-git-send-email-imammedo@redhat.com> In-Reply-To: <1411559299-19042-25-git-send-email-imammedo@redhat.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 24/30] scsi: cleanup not used anymore SCSIBusInfo{hotplug, hot_unplug} fields List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov , qemu-devel@nongnu.org Cc: dmitry@daynix.com, borntraeger@de.ibm.com, mst@redhat.com, agraf@suse.de, cornelia.huck@de.ibm.com, kraxel@redhat.com, amit.shah@redhat.com, rth@twiddle.net Il 24/09/2014 13:48, Igor Mammedov ha scritto: > 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 > --- > 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 33495b6..9bdc63b 100644 > --- a/hw/scsi/scsi-bus.c > +++ b/hw/scsi/scsi-bus.c > @@ -202,10 +202,6 @@ static void scsi_qdev_realize(DeviceState *qdev, Error **errp) > } > dev->vmsentry = qemu_add_vm_change_state_handler(scsi_dma_restart_cb, > dev); > - > - if (bus->info->hotplug) { > - bus->info->hotplug(bus, dev); > - } > } > > static void scsi_qdev_unrealize(DeviceState *qdev, Error **errp) > @@ -1918,17 +1914,6 @@ static int get_scsi_requests(QEMUFile *f, void *pv, size_t size) > return 0; > } > > -static int scsi_qdev_unplug(DeviceState *qdev) > -{ > - SCSIDevice *dev = SCSI_DEVICE(qdev); > - SCSIBus *bus = 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 = { > .name = "scsi-requests", > .get = get_scsi_requests, > @@ -1992,7 +1977,6 @@ static void scsi_device_class_init(ObjectClass *klass, void *data) > set_bit(DEVICE_CATEGORY_STORAGE, k->categories); > k->bus_type = TYPE_SCSI_BUS; > k->realize = scsi_qdev_realize; > - k->unplug = scsi_qdev_unplug; > k->unrealize = scsi_qdev_unrealize; > k->props = scsi_props; > } > diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h > index 2e3a8f9..8a2581e 100644 > --- a/include/hw/scsi/scsi.h > +++ b/include/hw/scsi/scsi.h > @@ -138,8 +138,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); > > Reviewed-by: Paolo Bonzini