Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [linux-nvme:nvme-6.16 11/14] drivers/nvme/target/core.c:1018:10: warning: variable 'ret' is uninitialized when used here
@ 2025-05-09  8:54 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-09  8:54 UTC (permalink / raw)
  To: Wilfred Mallawa
  Cc: llvm, oe-kbuild-all, linux-nvme, Christoph Hellwig,
	Damien Le Moal

tree:   git://git.infradead.org/nvme.git nvme-6.16
head:   a0136c6ac4a9aba90a47b9c691bc299a113b5259
commit: 206372d7c565174e6b8289dac03077b23b8369c9 [11/14] nvmet: support completion queue sharing
config: s390-randconfig-002-20250509 (https://download.01.org/0day-ci/archive/20250509/202505091619.QFU1fxsd-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250509/202505091619.QFU1fxsd-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505091619.QFU1fxsd-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/nvme/target/core.c:1018:10: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
    1018 |                 return ret;
         |                        ^~~
   drivers/nvme/target/core.c:1015:9: note: initialize the variable 'ret' to silence this warning
    1015 |         int ret;
         |                ^
         |                 = 0
   1 warning generated.


vim +/ret +1018 drivers/nvme/target/core.c

  1012	
  1013	int nvmet_sq_init(struct nvmet_sq *sq, struct nvmet_cq *cq)
  1014	{
  1015		int ret;
  1016	
  1017		if (!nvmet_cq_get(cq))
> 1018			return ret;
  1019	
  1020		ret = percpu_ref_init(&sq->ref, nvmet_sq_free, 0, GFP_KERNEL);
  1021		if (ret) {
  1022			pr_err("percpu_ref init failed!\n");
  1023			nvmet_cq_put(cq);
  1024			return ret;
  1025		}
  1026		init_completion(&sq->free_done);
  1027		init_completion(&sq->confirm_done);
  1028		nvmet_auth_sq_init(sq);
  1029		sq->cq = cq;
  1030	
  1031		return 0;
  1032	}
  1033	EXPORT_SYMBOL_GPL(nvmet_sq_init);
  1034	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-09  8:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-09  8:54 [linux-nvme:nvme-6.16 11/14] drivers/nvme/target/core.c:1018:10: warning: variable 'ret' is uninitialized when used here kernel test robot

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