Commit 6f9a71c6 authored by Caleb Sander's avatar Caleb Sander Committed by Keith Busch
Browse files

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: default avatarCaleb Sander <csander@purestorage.com>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent 4b682194
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -175,7 +175,7 @@ const char *nvme_get_error_status_str(u16 status)
{
	status &= 0x7ff;
	if (status < ARRAY_SIZE(nvme_statuses) && nvme_statuses[status])
		return nvme_statuses[status & 0x7ff];
		return nvme_statuses[status];
	return "Unknown";
}