dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

Blame 0004-virtio-scsi-clean-up-virtio_scsi_handle_event_vq.patch

a575c5
From: Stefan Hajnoczi <stefanha@redhat.com>
a575c5
Date: Tue, 17 May 2022 09:28:06 +0100
a575c5
Subject: [PATCH] virtio-scsi: clean up virtio_scsi_handle_event_vq()
a575c5
Content-type: text/plain
a575c5
a575c5
virtio_scsi_handle_event_vq() is only called from hw/scsi/virtio-scsi.c
a575c5
now and its return value is no longer used. Remove the function
a575c5
prototype from virtio-scsi.h and drop the return value.
a575c5
a575c5
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
a575c5
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
a575c5
Message-id: 20220427143541.119567-4-stefanha@redhat.com
a575c5
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
a575c5
(cherry picked from commit 37ce2de95169dacab3fb53d11bd4509b9c2e3a4c)
a575c5
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
a575c5
---
a575c5
 hw/scsi/virtio-scsi.c           | 4 +---
a575c5
 include/hw/virtio/virtio-scsi.h | 1 -
a575c5
 2 files changed, 1 insertion(+), 4 deletions(-)
a575c5
a575c5
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
a575c5
index 417fbc71d6..aa03a713d8 100644
a575c5
--- a/hw/scsi/virtio-scsi.c
a575c5
+++ b/hw/scsi/virtio-scsi.c
a575c5
@@ -856,13 +856,11 @@ void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev,
a575c5
     virtio_scsi_complete_req(req);
a575c5
 }
a575c5
 
a575c5
-bool virtio_scsi_handle_event_vq(VirtIOSCSI *s, VirtQueue *vq)
a575c5
+static void virtio_scsi_handle_event_vq(VirtIOSCSI *s, VirtQueue *vq)
a575c5
 {
a575c5
     if (s->events_dropped) {
a575c5
         virtio_scsi_push_event(s, NULL, VIRTIO_SCSI_T_NO_EVENT, 0);
a575c5
-        return true;
a575c5
     }
a575c5
-    return false;
a575c5
 }
a575c5
 
a575c5
 static void virtio_scsi_handle_event(VirtIODevice *vdev, VirtQueue *vq)
a575c5
diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h
a575c5
index 543681bc18..5957597825 100644
a575c5
--- a/include/hw/virtio/virtio-scsi.h
a575c5
+++ b/include/hw/virtio/virtio-scsi.h
a575c5
@@ -151,7 +151,6 @@ void virtio_scsi_common_realize(DeviceState *dev,
a575c5
                                 Error **errp);
a575c5
 
a575c5
 void virtio_scsi_common_unrealize(DeviceState *dev);
a575c5
-bool virtio_scsi_handle_event_vq(VirtIOSCSI *s, VirtQueue *vq);
a575c5
 bool virtio_scsi_handle_cmd_vq(VirtIOSCSI *s, VirtQueue *vq);
a575c5
 bool virtio_scsi_handle_ctrl_vq(VirtIOSCSI *s, VirtQueue *vq);
a575c5
 void virtio_scsi_init_req(VirtIOSCSI *s, VirtQueue *vq, VirtIOSCSIReq *req);