From: Baolin Wang Date: Tue, 27 Oct 2020 08:15:16 +0000 (+0800) Subject: nvme: simplify nvme_req_qid() X-Git-Tag: v5.11-rc1~109^2~24^2~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=84115d6d80c809d65c42f9383f22c10b91a4eb1c;p=thirdparty%2Fkernel%2Flinux.git nvme: simplify nvme_req_qid() Use the request's '->mq_hctx->queue_num' directly to simplify the nvme_req_qid() function. Signed-off-by: Baolin Wang Signed-off-by: Christoph Hellwig --- diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index bc330bf0d3bde..87867e93c7d30 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -178,7 +178,8 @@ static inline u16 nvme_req_qid(struct request *req) { if (!req->q->queuedata) return 0; - return blk_mq_unique_tag_to_hwq(blk_mq_unique_tag(req)) + 1; + + return req->mq_hctx->queue_num + 1; } /* The below value is the specific amount of delay needed before checking