From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH 1/3] nvmet: switch check for subsystem type
Date: Tue, 19 Oct 2021 06:37:31 +0000 [thread overview]
Message-ID: <78859610-656a-ef43-6a20-d3fc71dab4a2@nvidia.com> (raw)
In-Reply-To: <20211018152138.2128-2-hare@suse.de>
On 10/18/2021 8:21 AM, Hannes Reinecke wrote:
> Invert the check for discovery subsystem type to allow for additional
> discovery subsystem types.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> drivers/nvme/target/nvmet.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/target/nvmet.h b/drivers/nvme/target/nvmet.h
> index f31dcc4fb1a2..af193423c10b 100644
> --- a/drivers/nvme/target/nvmet.h
> +++ b/drivers/nvme/target/nvmet.h
> @@ -579,7 +579,7 @@ static inline struct nvmet_subsys *nvmet_req_subsys(struct nvmet_req *req)
>
> static inline bool nvmet_is_disc_subsys(struct nvmet_subsys *subsys)
> {
> - return subsys->type == NVME_NQN_DISC;
> + return subsys->type != NVME_NQN_NVME;
shouldn't we use switch and make code more readable for allowed
subsys->type values ? unless there is a reason ..
> }
>
> #ifdef CONFIG_NVME_TARGET_PASSTHRU
>
next prev parent reply other threads:[~2021-10-19 6:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 15:21 [PATCHv2 0/3] nvmet: discovery controller discovery support Hannes Reinecke
2021-10-18 15:21 ` [PATCH 1/3] nvmet: switch check for subsystem type Hannes Reinecke
2021-10-19 6:37 ` Chaitanya Kulkarni [this message]
2021-10-19 13:50 ` Hannes Reinecke
2021-10-18 15:21 ` [PATCH 2/3] nvme: add new discovery log page entry definitions Hannes Reinecke
2021-10-18 15:21 ` [PATCH 3/3] nvmet: register discovery subsystem as 'current' Hannes Reinecke
2021-10-27 6:07 ` [PATCHv2 0/3] nvmet: discovery controller discovery support Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2021-09-21 17:42 [PATCH 0/3] nvme: " Hannes Reinecke
2021-09-21 17:42 ` [PATCH 1/3] nvmet: switch check for subsystem type Hannes Reinecke
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=78859610-656a-ef43-6a20-d3fc71dab4a2@nvidia.com \
--to=chaitanyak@nvidia.com \
--cc=linux-nvme@lists.infradead.org \
/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