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 <csander@purestorage.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Keith Busch <kbusch@kernel.org>
1 parent 4b68219 commit 6f9a71c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)