Skip to content

Commit

Permalink
nvme: simplify nvme_req_qid()
Browse files Browse the repository at this point in the history
Use the request's '->mq_hctx->queue_num' directly to simplify the
nvme_req_qid() function.

Signed-off-by: Baolin Wang <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
  • Loading branch information
Baolin Wang authored and Christoph Hellwig committed Dec 1, 2020
1 parent 03d99e5 commit 84115d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/nvme/host/nvme.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 84115d6

Please sign in to comment.