diff options
author | Caleb Sander <csander@purestorage.com> | 2024-01-31 17:43:12 +0100 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2024-02-01 01:06:12 +0100 |
commit | 6f9a71c61183d6849d5aeab085b210c10398af9a (patch) | |
tree | c82d440efea3254693beea4eed9ca127ebc82b33 /drivers/nvme/host/constants.c | |
parent | nvme: return string as char *, not unsigned char * (diff) | |
download | linux-6f9a71c61183d6849d5aeab085b210c10398af9a.tar.xz linux-6f9a71c61183d6849d5aeab085b210c10398af9a.zip |
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>
Diffstat (limited to 'drivers/nvme/host/constants.c')
-rw-r--r-- | drivers/nvme/host/constants.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/constants.c b/drivers/nvme/host/constants.c index 8791283ec6ad..6f2ebb5fcdb0 100644 --- a/drivers/nvme/host/constants.c +++ b/drivers/nvme/host/constants.c @@ -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"; } |