]> www.infradead.org Git - nvme.git/commit
nvme: take const cmd pointer in read-only helpers
authorCaleb Sander <csander@purestorage.com>
Wed, 31 Jan 2024 16:43:13 +0000 (09:43 -0700)
committerKeith Busch <kbusch@kernel.org>
Thu, 1 Feb 2024 00:06:12 +0000 (16:06 -0800)
commitf9e9115d0c014dec3278d68823eaff159f98f4d6
treebe890680896eff32eee77c861d66785524a96a73
parent6f9a71c61183d6849d5aeab085b210c10398af9a
nvme: take const cmd pointer in read-only helpers

nvme_is_fabrics() and nvme_is_write() only read struct nvme_command,
so take it by const pointer. This allows callers to pass a const pointer
and communicates that these functions don't modify the command.

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>
include/linux/nvme.h