public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Sagi Grimberg <sagi@grimberg.me>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Cc: Christoph Hellwig <hch@lst.de>,
	Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
	Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH] nvmet: don't open-code NVME_NS_ATTR_RO enumeration
Date: Wed, 7 Dec 2022 18:25:53 +0000	[thread overview]
Message-ID: <350857bb-e8c1-445b-dd60-a9334a47fc0b@nvidia.com> (raw)
In-Reply-To: <20221207112823.1212380-1-sagi@grimberg.me>

On 12/7/22 03:28, Sagi Grimberg wrote:
> It is already there, just go ahead and use it.
> 
> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
> ---
>   drivers/nvme/target/admin-cmd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
> index 6b46f90a63cf..53a004ea320c 100644
> --- a/drivers/nvme/target/admin-cmd.c
> +++ b/drivers/nvme/target/admin-cmd.c
> @@ -561,7 +561,7 @@ static void nvmet_execute_identify_ns(struct nvmet_req *req)
>   	}
>   
>   	if (req->ns->readonly)
> -		id->nsattr |= (1 << 0);
> +		id->nsattr |= NVME_NS_ATTR_RO;
>   done:
>   	if (!status)
>   		status = nvmet_copy_to_sgl(req, 0, id, sizeof(*id));

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

-ck


      parent reply	other threads:[~2022-12-07 18:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07 11:28 [PATCH] nvmet: don't open-code NVME_NS_ATTR_RO enumeration Sagi Grimberg
2022-12-07 14:04 ` Christoph Hellwig
2022-12-07 18:25 ` Chaitanya Kulkarni [this message]

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=350857bb-e8c1-445b-dd60-a9334a47fc0b@nvidia.com \
    --to=chaitanyak@nvidia.com \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --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