diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2019-08-29 12:53:15 -0700 |
---|---|---|
committer | Sagi Grimberg <sagi@grimberg.me> | 2019-09-12 08:50:45 -0700 |
commit | 2f9c173647753b81eed7c198abf7622ab22dc49d (patch) | |
tree | 122881a4b8a8f437322f13e38f0890352af137d0 /drivers/nvme/host | |
parent | 74bd8cbe7dd64c50623cf0dc20eaeaab6b68d3d6 (diff) | |
download | linux-2f9c173647753b81eed7c198abf7622ab22dc49d.tar.bz2 |
nvme: pass status to nvme_error_status
No need for the full blown request structure.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Diffstat (limited to 'drivers/nvme/host')
-rw-r--r-- | drivers/nvme/host/core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 066aeecca5d2..2797d38d2dca 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -197,9 +197,9 @@ static inline bool nvme_ns_has_pi(struct nvme_ns *ns) return ns->pi_type && ns->ms == sizeof(struct t10_pi_tuple); } -static blk_status_t nvme_error_status(struct request *req) +static blk_status_t nvme_error_status(u16 status) { - switch (nvme_req(req)->status & 0x7ff) { + switch (status & 0x7ff) { case NVME_SC_SUCCESS: return BLK_STS_OK; case NVME_SC_CAP_EXCEEDED: @@ -262,7 +262,7 @@ static void nvme_retry_req(struct request *req) void nvme_complete_rq(struct request *req) { - blk_status_t status = nvme_error_status(req); + blk_status_t status = nvme_error_status(nvme_req(req)->status); trace_nvme_complete_rq(req); |