]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme: fix endianness of command word prints in nvme_log_err_passthru()
authorJohn Garry <john.g.garry@oracle.com>
Mon, 30 Jun 2025 16:21:53 +0000 (16:21 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Jul 2025 06:58:35 +0000 (08:58 +0200)
commit6256554df6c81337c52d91b383765732dad47fe6
tree3700e7970d784f8a4101567aeef0e67efc743bbd
parent433737ca249921b08e4247d963e987856ddf1039
nvme: fix endianness of command word prints in nvme_log_err_passthru()

[ Upstream commit dd8e34afd6709cb2f9c0e63340f567e6c066ed8e ]

The command word members of struct nvme_common_command are __le32 type,
so use helper le32_to_cpu() to read them properly.

Fixes: 9f079dda1433 ("nvme: allow passthru cmd error logging")
Signed-off-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Alan Adamson <alan.adamson@oracle.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c