Skip to content

Commit

Permalink
nvme: explicitly set non-error for directives
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Keith Busch authored and Christoph Hellwig committed Feb 28, 2022
1 parent 86c2457 commit 1c3adf0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/nvme/host/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,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;
}

Expand Down

0 comments on commit 1c3adf0

Please sign in to comment.