* [PATCH] nvme: multipath: fix return value of nvme_available_path
@ 2025-04-04 20:06 Uday Shankar
2025-04-07 14:34 ` Christoph Hellwig
2025-04-13 22:35 ` Sagi Grimberg
0 siblings, 2 replies; 3+ messages in thread
From: Uday Shankar @ 2025-04-04 20:06 UTC (permalink / raw)
To: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg
Cc: linux-nvme, linux-kernel, Hannes Reinecke, Uday Shankar
The function returns bool so we should return false, not NULL. No
functional changes are expected.
Signed-off-by: Uday Shankar <ushankar@purestorage.com>
---
drivers/nvme/host/multipath.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 6b12ca80aa27305a759990348c4c107655664d94..94152cf423f165aaba9cbb57f370ef4708365f1a 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -427,7 +427,7 @@ static bool nvme_available_path(struct nvme_ns_head *head)
struct nvme_ns *ns;
if (!test_bit(NVME_NSHEAD_DISK_LIVE, &head->flags))
- return NULL;
+ return false;
list_for_each_entry_srcu(ns, &head->list, siblings,
srcu_read_lock_held(&head->srcu)) {
---
base-commit: 0514a1379e11c6b8038674f43a478b0857d47a5e
change-id: 20250404-nvme_type-a8d541eff3da
Best regards,
--
Uday Shankar <ushankar@purestorage.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] nvme: multipath: fix return value of nvme_available_path
2025-04-04 20:06 [PATCH] nvme: multipath: fix return value of nvme_available_path Uday Shankar
@ 2025-04-07 14:34 ` Christoph Hellwig
2025-04-13 22:35 ` Sagi Grimberg
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2025-04-07 14:34 UTC (permalink / raw)
To: Uday Shankar
Cc: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
linux-nvme, linux-kernel, Hannes Reinecke
On Fri, Apr 04, 2025 at 02:06:43PM -0600, Uday Shankar wrote:
> The function returns bool so we should return false, not NULL. No
> functional changes are expected.
Thanks,
applied to nvme-6.15.
I'm a bit surprised this didn't generate a sparse warning similar to
when 0 is used in pointer context, but I guess that is because of the
implicit conversion of boolean expressions to the bool type.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme: multipath: fix return value of nvme_available_path
2025-04-04 20:06 [PATCH] nvme: multipath: fix return value of nvme_available_path Uday Shankar
2025-04-07 14:34 ` Christoph Hellwig
@ 2025-04-13 22:35 ` Sagi Grimberg
1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2025-04-13 22:35 UTC (permalink / raw)
To: Uday Shankar, Keith Busch, Jens Axboe, Christoph Hellwig
Cc: linux-nvme, linux-kernel, Hannes Reinecke
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-13 22:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-04 20:06 [PATCH] nvme: multipath: fix return value of nvme_available_path Uday Shankar
2025-04-07 14:34 ` Christoph Hellwig
2025-04-13 22:35 ` Sagi Grimberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®