public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Jaegeuk Kim <jaegeuk@kernel.org>,
	Bart Van Assche <bvanassche@acm.org>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Keith Busch <keith.busch@intel.com>
Subject: [PATCH 3/6] block: Change the return type of blk_mq_virtio_map_queues() into void
Date: Fri, 12 Aug 2022 14:07:57 -0700	[thread overview]
Message-ID: <20220812210800.2253972-4-bvanassche@acm.org> (raw)
In-Reply-To: <20220812210800.2253972-1-bvanassche@acm.org>

Since blk_mq_virtio_map_queues() always returns 0, change its return
type into void.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Keith Busch <keith.busch@intel.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 block/blk-mq-virtio.c         | 6 +++---
 drivers/scsi/virtio_scsi.c    | 3 ++-
 include/linux/blk-mq-virtio.h | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/block/blk-mq-virtio.c b/block/blk-mq-virtio.c
index fa84e748cb69..6589f076a096 100644
--- a/block/blk-mq-virtio.c
+++ b/block/blk-mq-virtio.c
@@ -21,7 +21,7 @@
  * that maps a queue to the CPUs that have irq affinity for the corresponding
  * vector.
  */
-int blk_mq_virtio_map_queues(struct blk_mq_queue_map *qmap,
+void blk_mq_virtio_map_queues(struct blk_mq_queue_map *qmap,
 		struct virtio_device *vdev, int first_vec)
 {
 	const struct cpumask *mask;
@@ -39,9 +39,9 @@ int blk_mq_virtio_map_queues(struct blk_mq_queue_map *qmap,
 			qmap->mq_map[cpu] = qmap->queue_offset + queue;
 	}
 
-	return 0;
+	return;
+
 fallback:
 	blk_mq_map_queues(qmap);
-	return 0;
 }
 EXPORT_SYMBOL_GPL(blk_mq_virtio_map_queues);
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 578c4b6d0f7d..afc12e25b715 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -716,7 +716,8 @@ static int virtscsi_map_queues(struct Scsi_Host *shost)
 	struct virtio_scsi *vscsi = shost_priv(shost);
 	struct blk_mq_queue_map *qmap = &shost->tag_set.map[HCTX_TYPE_DEFAULT];
 
-	return blk_mq_virtio_map_queues(qmap, vscsi->vdev, 2);
+	blk_mq_virtio_map_queues(qmap, vscsi->vdev, 2);
+	return 0;
 }
 
 static void virtscsi_commit_rqs(struct Scsi_Host *shost, u16 hwq)
diff --git a/include/linux/blk-mq-virtio.h b/include/linux/blk-mq-virtio.h
index 687ae287e1dc..13226e9b22dd 100644
--- a/include/linux/blk-mq-virtio.h
+++ b/include/linux/blk-mq-virtio.h
@@ -5,7 +5,7 @@
 struct blk_mq_queue_map;
 struct virtio_device;
 
-int blk_mq_virtio_map_queues(struct blk_mq_queue_map *qmap,
+void blk_mq_virtio_map_queues(struct blk_mq_queue_map *qmap,
 		struct virtio_device *vdev, int first_vec);
 
 #endif /* _LINUX_BLK_MQ_VIRTIO_H */

  parent reply	other threads:[~2022-08-12 21:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12 21:07 [PATCH 0/6] Make blk_mq_map_queues() return void Bart Van Assche
2022-08-12 21:07 ` [PATCH 1/6] block: Change the return type of blk_mq_map_queues() into void Bart Van Assche
2022-08-12 21:07 ` [PATCH 2/6] block: Change the return type of blk_mq_pci_map_queues() " Bart Van Assche
2022-08-12 21:07 ` Bart Van Assche [this message]
2022-08-12 21:07 ` [PATCH 4/6] scsi: Change the return type of .map_queues() " Bart Van Assche
2022-08-12 21:07 ` [PATCH 5/6] null_blk: Modify the behavior of null_map_queues() Bart Van Assche
2022-08-12 21:08 ` [PATCH 6/6] block: Change the return type of .map_queues() into void Bart Van Assche
2022-08-13  6:44 ` [PATCH 0/6] Make blk_mq_map_queues() return void Christoph Hellwig

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=20220812210800.2253972-4-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=jaegeuk@kernel.org \
    --cc=jasowang@redhat.com \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mst@redhat.com \
    /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