mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
nvme: rename nvme_sc_to_pr_err to nvme_status_to_pr_err
[ Upstream commit22f19a584d] This should better match its semantic. "sc" is used in the NVMe spec to specifically refer to the last 8 bits in the status field. We should not reuse "sc" here. Signed-off-by: Weiwen Hu <huweiwen@linux.alibaba.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org> Stable-dep-of:4a3f00262a("nvmet-tcp: bound SGL data length before allocating command buffers") Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d16df755b4
commit
59d4c2352e
@@ -72,12 +72,12 @@ static int nvme_send_ns_pr_command(struct nvme_ns *ns, struct nvme_command *c,
|
||||
return nvme_submit_sync_cmd(ns->queue, c, data, data_len);
|
||||
}
|
||||
|
||||
static int nvme_sc_to_pr_err(int nvme_sc)
|
||||
static int nvme_status_to_pr_err(int status)
|
||||
{
|
||||
if (nvme_is_path_error(nvme_sc))
|
||||
if (nvme_is_path_error(status))
|
||||
return PR_STS_PATH_FAILED;
|
||||
|
||||
switch (nvme_sc & 0x7ff) {
|
||||
switch (status & 0x7ff) {
|
||||
case NVME_SC_SUCCESS:
|
||||
return PR_STS_SUCCESS;
|
||||
case NVME_SC_RESERVATION_CONFLICT:
|
||||
@@ -122,7 +122,7 @@ static int nvme_pr_command(struct block_device *bdev, u32 cdw10,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return nvme_sc_to_pr_err(ret);
|
||||
return nvme_status_to_pr_err(ret);
|
||||
}
|
||||
|
||||
static int nvme_pr_register(struct block_device *bdev, u64 old,
|
||||
@@ -197,7 +197,7 @@ retry:
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return nvme_sc_to_pr_err(ret);
|
||||
return nvme_status_to_pr_err(ret);
|
||||
}
|
||||
|
||||
static int nvme_pr_read_keys(struct block_device *bdev,
|
||||
|
||||
Reference in New Issue
Block a user