public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Irvin Cote <irvincoteg@gmail.com>
To: hch@lst.de
Cc: kbusch@kernel.org, axboe@kernel.dk, sagi@grimberg.me,
	linux-nvme@lists.infradead.org, Irvin Cote <irvincoteg@gmail.com>
Subject: [PATCH 1/2] nvme-core: remove redundant condition in nvme_ns_head_multipath
Date: Thu, 18 May 2023 19:10:53 -0300	[thread overview]
Message-ID: <20230518221054.56378-2-irvincoteg@gmail.com> (raw)
In-Reply-To: <20230518221054.56378-1-irvincoteg@gmail.com>

head->disk implies IS_ENABLED(CONFIG_NVME_MULTIPATH) (c.f
nvme_mpath_alloc_disk) hence the condition is redundant.

Signed-off-by: Irvin Cote <irvincoteg@gmail.com>
---
 drivers/nvme/host/nvme.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index bf46f122e9e1..7820e40cdce4 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -453,7 +453,7 @@ struct nvme_ns_head {
 
 static inline bool nvme_ns_head_multipath(struct nvme_ns_head *head)
 {
-	return IS_ENABLED(CONFIG_NVME_MULTIPATH) && head->disk;
+	return head->disk;
 }
 
 enum nvme_ns_features {
-- 
2.39.2



  reply	other threads:[~2023-05-18 22:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-18 22:10 [PATCH 0/2] minor changes regarding multipath-head assertion Irvin Cote
2023-05-18 22:10 ` Irvin Cote [this message]
2023-05-19  2:12   ` [PATCH 1/2] nvme-core: remove redundant condition in nvme_ns_head_multipath Jens Axboe
2023-05-20  4:24     ` Christoph Hellwig
2023-05-18 22:10 ` [PATCH 2/2] nvme-core: use nvme_ns_head_multipath instead of ns->head->disk Irvin Cote
2023-05-20  4:24   ` Christoph Hellwig
2023-06-12 17:59   ` Keith Busch

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=20230518221054.56378-2-irvincoteg@gmail.com \
    --to=irvincoteg@gmail.com \
    --cc=axboe@kernel.dk \
    --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