linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Alok Tiwari <alok.a.tiwari@oracle.com>,
	linux-nvme@lists.infradead.org, kbusch@kernel.org,
	axboe@kernel.dk, hch@lst.de, sagi@grimberg.me, kch@nvidia.com,
	nilay@linux.ibm.com, corbet@lwn.net
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] nvmet: Remove redundant assignment of error code in nvmet_ns_enable()
Date: Mon, 23 Jun 2025 13:45:31 -0700	[thread overview]
Message-ID: <50e80a33-30cc-4231-87ad-c0fa392acf45@infradead.org> (raw)
In-Reply-To: <20250623064036.4187788-4-alok.a.tiwari@oracle.com>



On 6/22/25 11:40 PM, Alok Tiwari wrote:
> removing the unnecessary ret = -EMFILE; assignment since it is
> immediately overwritten by the result of nvmet_bdev_ns_enable()
> The initial value(-EMFILE) is redundant because it has no effect
> on the code logic or outcome.
> 
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>

Reviewed-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  drivers/nvme/target/core.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
> index 175c5b6d4dd58..884286f90688a 100644
> --- a/drivers/nvme/target/core.c
> +++ b/drivers/nvme/target/core.c
> @@ -581,8 +581,6 @@ int nvmet_ns_enable(struct nvmet_ns *ns)
>  	if (ns->enabled)
>  		goto out_unlock;
>  
> -	ret = -EMFILE;
> -
>  	ret = nvmet_bdev_ns_enable(ns);
>  	if (ret == -ENOTBLK)
>  		ret = nvmet_file_ns_enable(ns);

-- 
~Randy

  reply	other threads:[~2025-06-23 20:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23  6:40 [PATCH 1/5] nvme: Fix multiple spelling and grammar issues in host drivers Alok Tiwari
2025-06-23  6:40 ` [PATCH 2/5] nvme: Fix incorrect variable in io cqes error message Alok Tiwari
2025-06-23 20:44   ` Randy Dunlap
2025-06-23  6:40 ` [PATCH 3/5] nvmet: Remove redundant assignment of error code in nvmet_ns_enable() Alok Tiwari
2025-06-23 20:45   ` Randy Dunlap [this message]
2025-06-23  6:40 ` [PATCH 4/5] nvme: Fix typo in status code constant for self-test in progress Alok Tiwari
2025-06-23 20:46   ` Randy Dunlap
2025-06-23  6:40 ` [PATCH 5/5] docs: nvme: fix grammar in nvme-pci-endpoint-target.rst Alok Tiwari
2025-06-23 20:39   ` Randy Dunlap
2025-06-23 20:44 ` [PATCH 1/5] nvme: Fix multiple spelling and grammar issues in host drivers Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50e80a33-30cc-4231-87ad-c0fa392acf45@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=alok.a.tiwari@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=corbet@lwn.net \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=kch@nvidia.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=nilay@linux.ibm.com \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).