mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 23:54:04 +08:00
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>
This commit is contained in:
parent
4b6821940e
commit
6f9a71c611
@ -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";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user