summaryrefslogtreecommitdiff
path: root/drivers/nvme/host/pci.c
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2016-11-15 11:11:58 -0800
committerJens Axboe <axboe@fb.com>2016-11-15 12:50:11 -0700
commitbac0000af5f8476a64ca7529a4243e23c016fc89 (patch)
tree50bddc36705c2780bc99e107bb2dd37d6fa00c22 /drivers/nvme/host/pci.c
parentb4a567e8114327518c09f5632339a5954ab975a3 (diff)
downloadlwn-bac0000af5f8476a64ca7529a4243e23c016fc89.tar.gz
lwn-bac0000af5f8476a64ca7529a4243e23c016fc89.zip
nvme: untangle 0 and BLK_MQ_RQ_QUEUE_OK
Let's not depend on any of the BLK_MQ_RQ_QUEUE_* constants having specific values. No functional change. Signed-off-by: Omar Sandoval <osandov@fb.com> Reviewed-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/host/pci.c')
-rw-r--r--drivers/nvme/host/pci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 51d13d5ec7a8..d58f8e4e2c06 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -328,7 +328,7 @@ static int nvme_init_iod(struct request *rq, unsigned size,
rq->retries = 0;
rq->rq_flags |= RQF_DONTPREP;
}
- return 0;
+ return BLK_MQ_RQ_QUEUE_OK;
}
static void nvme_free_iod(struct nvme_dev *dev, struct request *req)
@@ -598,17 +598,17 @@ static int nvme_queue_rq(struct blk_mq_hw_ctx *hctx,
map_len = nvme_map_len(req);
ret = nvme_init_iod(req, map_len, dev);
- if (ret)
+ if (ret != BLK_MQ_RQ_QUEUE_OK)
return ret;
ret = nvme_setup_cmd(ns, req, &cmnd);
- if (ret)
+ if (ret != BLK_MQ_RQ_QUEUE_OK)
goto out;
if (req->nr_phys_segments)
ret = nvme_map_data(dev, req, map_len, &cmnd);
- if (ret)
+ if (ret != BLK_MQ_RQ_QUEUE_OK)
goto out;
cmnd.common.command_id = req->tag;