All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] nvme: return BLK_STS_OK on success in nvme_setup_rw
       [not found] <CGME20220427191045uscas1p2cff082022143327c9d6bfdf39e4eb861@uscas1p2.samsung.com>
@ 2022-04-27 19:10 ` Vincent Fu
  2022-04-29  6:09   ` Hannes Reinecke
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Fu @ 2022-04-27 19:10 UTC (permalink / raw)
  To: linux-nvme; +Cc: Vincent Fu, Pankaj Raghav, Sagi Grimberg

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@samsung.com>
Reviewed-by: Pankaj Raghav <p.raghav@samsung.com>
Reviewed-by: Sagi Grimberg <sagi@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)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] nvme: return BLK_STS_OK on success in nvme_setup_rw
  2022-04-27 19:10 ` [PATCH v2] nvme: return BLK_STS_OK on success in nvme_setup_rw Vincent Fu
@ 2022-04-29  6:09   ` Hannes Reinecke
  0 siblings, 0 replies; 2+ messages in thread
From: Hannes Reinecke @ 2022-04-29  6:09 UTC (permalink / raw)
  To: Vincent Fu, linux-nvme; +Cc: Pankaj Raghav, Sagi Grimberg

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@samsung.com>
> Reviewed-by: Pankaj Raghav <p.raghav@samsung.com>
> Reviewed-by: Sagi Grimberg <sagi@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@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-29  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20220427191045uscas1p2cff082022143327c9d6bfdf39e4eb861@uscas1p2.samsung.com>
2022-04-27 19:10 ` [PATCH v2] nvme: return BLK_STS_OK on success in nvme_setup_rw Vincent Fu
2022-04-29  6:09   ` Hannes Reinecke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.