Skip to content

Commit 22f19a5

Browse files
huww98keithbusch
authored andcommitted
nvme: rename nvme_sc_to_pr_err to nvme_status_to_pr_err
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 <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent 1a9e218 commit 22f19a5

File tree

1 file changed

+5
-5
lines changed
  • drivers/nvme/host

1 file changed

+5
-5
lines changed

drivers/nvme/host/pr.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ static int nvme_send_ns_pr_command(struct nvme_ns *ns, struct nvme_command *c,
7272
return nvme_submit_sync_cmd(ns->queue, c, data, data_len);
7373
}
7474

75-
static int nvme_sc_to_pr_err(int nvme_sc)
75+
static int nvme_status_to_pr_err(int status)
7676
{
77-
if (nvme_is_path_error(nvme_sc))
77+
if (nvme_is_path_error(status))
7878
return PR_STS_PATH_FAILED;
7979

80-
switch (nvme_sc & 0x7ff) {
80+
switch (status & 0x7ff) {
8181
case NVME_SC_SUCCESS:
8282
return PR_STS_SUCCESS;
8383
case NVME_SC_RESERVATION_CONFLICT:
@@ -121,7 +121,7 @@ static int nvme_pr_command(struct block_device *bdev, u32 cdw10,
121121
if (ret < 0)
122122
return ret;
123123

124-
return nvme_sc_to_pr_err(ret);
124+
return nvme_status_to_pr_err(ret);
125125
}
126126

127127
static int nvme_pr_register(struct block_device *bdev, u64 old,
@@ -196,7 +196,7 @@ static int nvme_pr_resv_report(struct block_device *bdev, void *data,
196196
if (ret < 0)
197197
return ret;
198198

199-
return nvme_sc_to_pr_err(ret);
199+
return nvme_status_to_pr_err(ret);
200200
}
201201

202202
static int nvme_pr_read_keys(struct block_device *bdev,

0 commit comments

Comments
 (0)