Skip to content

Commit 6f9a71c

Browse files
calebsanderkeithbusch
authored andcommitted
nvme: remove redundant status mask
In nvme_get_error_status_str(), the status code is already masked with 0x7ff at the beginning of the function. Don't bother masking it again when indexing nvme_statuses. Signed-off-by: Caleb Sander <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent 4b68219 commit 6f9a71c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/constants.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const char *nvme_get_error_status_str(u16 status)
175175
{
176176
status &= 0x7ff;
177177
if (status < ARRAY_SIZE(nvme_statuses) && nvme_statuses[status])
178-
return nvme_statuses[status & 0x7ff];
178+
return nvme_statuses[status];
179179
return "Unknown";
180180
}
181181

0 commit comments

Comments
 (0)