Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] nvme-tcp: initialize the mq_map to NULL
@ 2025-01-09  6:30 Chaitanya Kulkarni
  2025-01-09  6:30 ` [PATCH 2/2] nvme-tcp: remove unused variable Chaitanya Kulkarni
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2025-01-09  6:30 UTC (permalink / raw)
  To: linux-nvme; +Cc: kbusch, hch, sagi, Chaitanya Kulkarni, kernel test robot

Initialize the local variable mq_map to NULL to remove the kernel
test robot warning.

drivers/nvme/host/tcp.c:1594:13: warning: variable 'mq_map' is used
uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]

Fixes: bd0f5c103101 ("nvme-tcp: Fix I/O queue cpu spreading for multiple controllers")  
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501091328.r4kJ6xhy-lkp@intel.com/
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
 drivers/nvme/host/tcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 544d6aa00cc3..d6a40b7dba73 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -1578,7 +1578,7 @@ static void nvme_tcp_set_queue_io_cpu(struct nvme_tcp_queue *queue)
 	struct nvme_tcp_ctrl *ctrl = queue->ctrl;
 	struct blk_mq_tag_set *set = &ctrl->tag_set;
 	int qid = nvme_tcp_queue_id(queue) - 1;
-	unsigned int *mq_map;
+	unsigned int *mq_map = NULL;
 	int cpu, n = 0, min_queues = INT_MAX, io_cpu;
 
 	if (wq_unbound)
-- 
2.40.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-01-11  3:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-09  6:30 [PATCH 1/2] nvme-tcp: initialize the mq_map to NULL Chaitanya Kulkarni
2025-01-09  6:30 ` [PATCH 2/2] nvme-tcp: remove unused variable Chaitanya Kulkarni
2025-01-09 10:59   ` Nilay Shroff
2025-01-09 10:58 ` [PATCH 1/2] nvme-tcp: initialize the mq_map to NULL Nilay Shroff
2025-01-10 22:48 ` Sagi Grimberg
2025-01-11  3:57   ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox