[PATCH v2] nvme: return BLK_STS_OK on success in nvme_setup_rw

Hannes Reinecke hare at suse.de
Thu Apr 28 23:09:42 PDT 2022


On 4/27/22 21:10, 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>
> Reviewed-by: Pankaj Raghav <p.raghav at samsung.com>
> Reviewed-by: Sagi Grimberg <sagi at grimberg.me>
> ---
> v1 -> v2:
>    - improved commit message first line
>    - added reviewed-by tags
> 
>   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)

Reviewed-by: Hannes Reinecke <hare at suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare at suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



More information about the Linux-nvme mailing list