[PATCH] nvme: have nvme_setup_rw return BLK_STS_OK
Pankaj Raghav
pankydev8 at gmail.com
Tue Apr 19 07:16:55 PDT 2022
On Mon, Apr 18, 2022 at 07:43:50PM +0000, Vincent Fu wrote:
> 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
>
Small nit:
The commit line could be changed to:
nvme: return BLK_STS_OK on success in nvme_setup_rw
Otherwise, Looks good.
Reviewed-by: Pankaj Raghav <p.raghav at samsung.com>
--
Pankaj Raghav
More information about the Linux-nvme
mailing list