All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: explicitly set non-error for directives
@ 2022-02-15 15:03 Keith Busch
  2022-02-15 17:04 ` Chaitanya Kulkarni
  2022-02-16  8:05 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Keith Busch @ 2022-02-15 15:03 UTC (permalink / raw)
  To: linux-nvme, hch; +Cc: sagi, Keith Busch, Jiapeng Chong

Stream directives is an optional feature. It is not an error if a
controller doesn't support as many as the kernel can optionally use.
Explicitly set the non-error return value on this condition with a
comment explaining why.

Note, the return value was already 0 in this condition, so the setting
is redundant. This patch should just silence bots that falsely believe
the condition contains an error omission.

Cc: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 drivers/nvme/host/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 79005ea1a33e..fda837ce67ce 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -777,6 +777,8 @@ static int nvme_configure_directives(struct nvme_ctrl *ctrl)
 	if (ctrl->nssa < BLK_MAX_WRITE_HINTS - 1) {
 		dev_info(ctrl->device, "too few streams (%u) available\n",
 					ctrl->nssa);
+		/* this condition is not an error: streams are optional */
+		ret = 0;
 		goto out_disable_stream;
 	}
 
-- 
2.25.4



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

* Re: [PATCH] nvme: explicitly set non-error for directives
  2022-02-15 15:03 [PATCH] nvme: explicitly set non-error for directives Keith Busch
@ 2022-02-15 17:04 ` Chaitanya Kulkarni
  2022-02-16  8:05 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2022-02-15 17:04 UTC (permalink / raw)
  To: Keith Busch; +Cc: sagi, hch, linux-nvme, Jiapeng Chong

On 2/15/22 07:03, Keith Busch wrote:
> Stream directives is an optional feature. It is not an error if a
> controller doesn't support as many as the kernel can optionally use.
> Explicitly set the non-error return value on this condition with a
> comment explaining why.
> 
> Note, the return value was already 0 in this condition, so the setting
> is redundant. This patch should just silence bots that falsely believe
> the condition contains an error omission.
> 
> Cc: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> Signed-off-by: Keith Busch <kbusch@kernel.org>
> ---

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>



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

* Re: [PATCH] nvme: explicitly set non-error for directives
  2022-02-15 15:03 [PATCH] nvme: explicitly set non-error for directives Keith Busch
  2022-02-15 17:04 ` Chaitanya Kulkarni
@ 2022-02-16  8:05 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2022-02-16  8:05 UTC (permalink / raw)
  To: Keith Busch; +Cc: linux-nvme, hch, sagi, Jiapeng Chong

Thanks,

applied to nvme-5.18.


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

end of thread, other threads:[~2022-02-16  8:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15 15:03 [PATCH] nvme: explicitly set non-error for directives Keith Busch
2022-02-15 17:04 ` Chaitanya Kulkarni
2022-02-16  8:05 ` Christoph Hellwig

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.