qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Nir Soffer <nsoffer@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-stable@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: [PATCH 5/6] virtio-scsi: clean up virtio_scsi_handle_cmd_vq()
Date: Wed, 27 Apr 2022 15:35:40 +0100	[thread overview]
Message-ID: <20220427143541.119567-6-stefanha@redhat.com> (raw)
In-Reply-To: <20220427143541.119567-1-stefanha@redhat.com>

virtio_scsi_handle_cmd_vq() is only called from hw/scsi/virtio-scsi.c
now and its return value is no longer used. Remove the function
prototype from virtio-scsi.h and drop the return value.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 include/hw/virtio/virtio-scsi.h | 1 -
 hw/scsi/virtio-scsi.c           | 5 +----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h
index 44dc3b81ec..2497530064 100644
--- a/include/hw/virtio/virtio-scsi.h
+++ b/include/hw/virtio/virtio-scsi.h
@@ -151,7 +151,6 @@ void virtio_scsi_common_realize(DeviceState *dev,
                                 Error **errp);
 
 void virtio_scsi_common_unrealize(DeviceState *dev);
-bool virtio_scsi_handle_cmd_vq(VirtIOSCSI *s, VirtQueue *vq);
 void virtio_scsi_init_req(VirtIOSCSI *s, VirtQueue *vq, VirtIOSCSIReq *req);
 void virtio_scsi_free_req(VirtIOSCSIReq *req);
 void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev,
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index eefda16e4b..12c6a21202 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -685,12 +685,11 @@ static void virtio_scsi_handle_cmd_req_submit(VirtIOSCSI *s, VirtIOSCSIReq *req)
     scsi_req_unref(sreq);
 }
 
-bool virtio_scsi_handle_cmd_vq(VirtIOSCSI *s, VirtQueue *vq)
+static void virtio_scsi_handle_cmd_vq(VirtIOSCSI *s, VirtQueue *vq)
 {
     VirtIOSCSIReq *req, *next;
     int ret = 0;
     bool suppress_notifications = virtio_queue_get_notification(vq);
-    bool progress = false;
 
     QTAILQ_HEAD(, VirtIOSCSIReq) reqs = QTAILQ_HEAD_INITIALIZER(reqs);
 
@@ -700,7 +699,6 @@ bool virtio_scsi_handle_cmd_vq(VirtIOSCSI *s, VirtQueue *vq)
         }
 
         while ((req = virtio_scsi_pop_req(s, vq))) {
-            progress = true;
             ret = virtio_scsi_handle_cmd_req_prepare(s, req);
             if (!ret) {
                 QTAILQ_INSERT_TAIL(&reqs, req, next);
@@ -725,7 +723,6 @@ bool virtio_scsi_handle_cmd_vq(VirtIOSCSI *s, VirtQueue *vq)
     QTAILQ_FOREACH_SAFE(req, &reqs, next, next) {
         virtio_scsi_handle_cmd_req_submit(s, req);
     }
-    return progress;
 }
 
 static void virtio_scsi_handle_cmd(VirtIODevice *vdev, VirtQueue *vq)
-- 
2.35.1



  parent reply	other threads:[~2022-04-27 14:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 14:35 [PATCH 0/6] virtio-scsi: fix 100% CPU consumption in IOThread Stefan Hajnoczi
2022-04-27 14:35 ` [PATCH 1/6] virtio-scsi: fix ctrl and event handler functions in dataplane mode Stefan Hajnoczi
2022-04-27 19:47   ` Michael Tokarev
2022-04-28  9:05     ` Stefan Hajnoczi
2022-04-28 23:18   ` Paolo Bonzini
2022-04-27 14:35 ` [PATCH 2/6] virtio-scsi: don't waste CPU polling the event virtqueue Stefan Hajnoczi
2022-04-27 20:12   ` Nir Soffer
2022-04-28  9:05     ` Stefan Hajnoczi
2022-04-28 23:17   ` Paolo Bonzini
2022-04-30  5:52     ` Stefan Hajnoczi
2022-04-27 14:35 ` [PATCH 3/6] virtio-scsi: clean up virtio_scsi_handle_event_vq() Stefan Hajnoczi
2022-04-28 23:17   ` Paolo Bonzini
2022-04-27 14:35 ` [PATCH 4/6] virtio-scsi: clean up virtio_scsi_handle_ctrl_vq() Stefan Hajnoczi
2022-04-28 23:17   ` Paolo Bonzini
2022-04-27 14:35 ` Stefan Hajnoczi [this message]
2022-04-28 23:17   ` [PATCH 5/6] virtio-scsi: clean up virtio_scsi_handle_cmd_vq() Paolo Bonzini
2022-04-27 14:35 ` [PATCH 6/6] virtio-scsi: move request-related items from .h to .c Stefan Hajnoczi
2022-04-28 23:17   ` Paolo Bonzini
2022-05-09  9:45 ` [PATCH 0/6] virtio-scsi: fix 100% CPU consumption in IOThread Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220427143541.119567-6-stefanha@redhat.com \
    --to=stefanha@redhat.com \
    --cc=nsoffer@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).