blk-mq: remove 'tag' parameter from mq_ops->poll()
authorJens Axboe <axboe@kernel.dk>
Fri, 16 Nov 2018 16:48:21 +0000 (09:48 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 26 Nov 2018 15:25:44 +0000 (08:25 -0700)
We always pass in -1 now and none of the callers use the tag value,
remove the parameter.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c
drivers/nvme/host/pci.c
drivers/nvme/host/rdma.c
include/linux/blk-mq.h

index ec6c79578332344190eefe307ccc6f6757230e34..b66cca3ce1e51e6081236918581f76d5681a057b 100644 (file)
@@ -3380,7 +3380,7 @@ static int blk_mq_poll(struct request_queue *q, blk_qc_t cookie)
 
                hctx->poll_invoked++;
 
-               ret = q->mq_ops->poll(hctx, -1U);
+               ret = q->mq_ops->poll(hctx);
                if (ret > 0) {
                        hctx->poll_success++;
                        __set_current_state(TASK_RUNNING);
index de50d80ecc847cd442f4429797fe68d499d74de7..73effe586e5f07a5917cef0dbd46ff57e0c36142 100644 (file)
@@ -1075,14 +1075,14 @@ static int __nvme_poll(struct nvme_queue *nvmeq, unsigned int tag)
        return found;
 }
 
-static int nvme_poll(struct blk_mq_hw_ctx *hctx, unsigned int tag)
+static int nvme_poll(struct blk_mq_hw_ctx *hctx)
 {
        struct nvme_queue *nvmeq = hctx->driver_data;
 
-       return __nvme_poll(nvmeq, tag);
+       return __nvme_poll(nvmeq, -1);
 }
 
-static int nvme_poll_noirq(struct blk_mq_hw_ctx *hctx, unsigned int tag)
+static int nvme_poll_noirq(struct blk_mq_hw_ctx *hctx)
 {
        struct nvme_queue *nvmeq = hctx->driver_data;
        u16 start, end;
@@ -1092,7 +1092,7 @@ static int nvme_poll_noirq(struct blk_mq_hw_ctx *hctx, unsigned int tag)
                return 0;
 
        spin_lock(&nvmeq->cq_lock);
-       found = nvme_process_cq(nvmeq, &start, &end, tag);
+       found = nvme_process_cq(nvmeq, &start, &end, -1);
        spin_unlock(&nvmeq->cq_lock);
 
        nvme_complete_cqes(nvmeq, start, end);
index c2c3e1a5b7affe09fa77ffc87e4961be73720809..ccfde6c7c0a5e02a6ded11ead5528d9d59db0978 100644 (file)
@@ -1736,7 +1736,7 @@ err:
        return BLK_STS_IOERR;
 }
 
-static int nvme_rdma_poll(struct blk_mq_hw_ctx *hctx, unsigned int tag)
+static int nvme_rdma_poll(struct blk_mq_hw_ctx *hctx)
 {
        struct nvme_rdma_queue *queue = hctx->driver_data;
        struct ib_cq *cq = queue->ib_cq;
index 929e8abc5535010e59c94984114b4fee51250d1d..ca0520ca64377f42ba37e43e2d1f3eaaecb2538f 100644 (file)
@@ -132,7 +132,7 @@ typedef void (exit_request_fn)(struct blk_mq_tag_set *set, struct request *,
 typedef bool (busy_iter_fn)(struct blk_mq_hw_ctx *, struct request *, void *,
                bool);
 typedef bool (busy_tag_iter_fn)(struct request *, void *, bool);
-typedef int (poll_fn)(struct blk_mq_hw_ctx *, unsigned int);
+typedef int (poll_fn)(struct blk_mq_hw_ctx *);
 typedef int (map_queues_fn)(struct blk_mq_tag_set *set);
 typedef bool (busy_fn)(struct request_queue *);
 typedef void (complete_fn)(struct request *);