Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-nvme@lists.infradead.org, Christoph Hellwig <hch@lst.de>,
	Damien Le Moal <dlemoal@kernel.org>
Subject: [linux-nvme:nvme-6.16 11/14] drivers/nvme/target/core.c:1018:10: warning: variable 'ret' is uninitialized when used here
Date: Fri, 9 May 2025 16:54:02 +0800	[thread overview]
Message-ID: <202505091619.QFU1fxsd-lkp@intel.com> (raw)

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

                 reply	other threads:[~2025-05-09  8:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202505091619.QFU1fxsd-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dlemoal@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-nvme@lists.infradead.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=wilfred.mallawa@wdc.com \
    /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