[PATCH] nvme: have nvme_setup_rw return BLK_STS_OK

Vincent Fu vincent.fu at samsung.com
Mon Apr 18 12:43:50 PDT 2022


Return BLK_STS_OK instead of 0 on success. Since BLK_STS_OK is defined
as 0 this patch results in no functional change but to avoid confusion
and to be consistent with nvme_setup_write_zeroes as well as
nvme_setup_discard we should have nvme_setup_rw also return BLK_STS_OK.

Signed-off-by: Vincent Fu <vincent.fu at samsung.com>
---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index b9b0fbde9..f45665e36 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -895,7 +895,7 @@ static inline blk_status_t nvme_setup_rw(struct nvme_ns *ns,
 
 	cmnd->rw.control = cpu_to_le16(control);
 	cmnd->rw.dsmgmt = cpu_to_le32(dsmgmt);
-	return 0;
+	return BLK_STS_OK;
 }
 
 void nvme_cleanup_cmd(struct request *req)
-- 
2.25.1



More information about the Linux-nvme mailing list