Blame 0005-virtio-scsi-clean-up-virtio_scsi_handle_ctrl_vq.patch

a575c5
From: Stefan Hajnoczi <stefanha@redhat.com>
a575c5
Date: Tue, 17 May 2022 09:28:12 +0100
a575c5
Subject: [PATCH] virtio-scsi: clean up virtio_scsi_handle_ctrl_vq()
a575c5
Content-type: text/plain
a575c5
a575c5
virtio_scsi_handle_ctrl_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-5-stefanha@redhat.com
a575c5
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
a575c5
(cherry picked from commit 73b3b49f1880f236b4d0ffd7efb00280c05a5fab)
a575c5
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
a575c5
---
a575c5
 hw/scsi/virtio-scsi.c           | 5 +----
a575c5
 include/hw/virtio/virtio-scsi.h | 1 -
a575c5
 2 files changed, 1 insertion(+), 5 deletions(-)
a575c5
a575c5
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
a575c5
index aa03a713d8..eefda16e4b 100644
a575c5
--- a/hw/scsi/virtio-scsi.c
a575c5
+++ b/hw/scsi/virtio-scsi.c
a575c5
@@ -460,16 +460,13 @@ static void virtio_scsi_handle_ctrl_req(VirtIOSCSI *s, VirtIOSCSIReq *req)
a575c5
     }
a575c5
 }
a575c5
 
a575c5
-bool virtio_scsi_handle_ctrl_vq(VirtIOSCSI *s, VirtQueue *vq)
a575c5
+static void virtio_scsi_handle_ctrl_vq(VirtIOSCSI *s, VirtQueue *vq)
a575c5
 {
a575c5
     VirtIOSCSIReq *req;
a575c5
-    bool progress = false;
a575c5
 
a575c5
     while ((req = virtio_scsi_pop_req(s, vq))) {
a575c5
-        progress = true;
a575c5
         virtio_scsi_handle_ctrl_req(s, req);
a575c5
     }
a575c5
-    return progress;
a575c5
 }
a575c5
 
a575c5
 /*
a575c5
diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h
a575c5
index 5957597825..44dc3b81ec 100644
a575c5
--- a/include/hw/virtio/virtio-scsi.h
a575c5
+++ b/include/hw/virtio/virtio-scsi.h
a575c5
@@ -152,7 +152,6 @@ void virtio_scsi_common_realize(DeviceState *dev,
a575c5
 
a575c5
 void virtio_scsi_common_unrealize(DeviceState *dev);
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);
a575c5
 void virtio_scsi_free_req(VirtIOSCSIReq *req);
a575c5
 void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev,