From: kernel test robot <lkp@intel.com>
To: Kanchan Joshi <joshi.k@samsung.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>,
linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Anuj Gupta <anuj20.g@samsung.com>, Christoph Hellwig <hch@lst.de>
Subject: [ammarfaizi2-block:axboe/linux-block/for-5.19/io_uring-passthrough 19/20] drivers/nvme/host/ioctl.c:690:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false
Date: Fri, 6 May 2022 13:23:45 +0800 [thread overview]
Message-ID: <202205061324.Uf7nd6hz-lkp@intel.com> (raw)
tree: https://github.com/ammarfaizi2/linux-block axboe/linux-block/for-5.19/io_uring-passthrough
head: 6f7c47f1c2768790e557c301ddf75498f36f12b2
commit: 86116c2f6fee81a0be72a71cc2f1f7c087df8efa [19/20] nvme: wire-up uring-cmd support for io-passthru on char-device.
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20220506/202205061324.Uf7nd6hz-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5e004fb787698440a387750db7f8028e7cb14cfc)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/ammarfaizi2/linux-block/commit/86116c2f6fee81a0be72a71cc2f1f7c087df8efa
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block axboe/linux-block/for-5.19/io_uring-passthrough
git checkout 86116c2f6fee81a0be72a71cc2f1f7c087df8efa
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/nvme/host/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/nvme/host/ioctl.c:690:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (ns)
^~
drivers/nvme/host/ioctl.c:693:9: note: uninitialized use occurs here
return ret;
^~~
drivers/nvme/host/ioctl.c:690:2: note: remove the 'if' if its condition is always true
if (ns)
^~~~~~~
drivers/nvme/host/ioctl.c:688:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +690 drivers/nvme/host/ioctl.c
680
681 int nvme_ns_head_chr_uring_cmd(struct io_uring_cmd *ioucmd,
682 unsigned int issue_flags)
683 {
684 struct cdev *cdev = file_inode(ioucmd->file)->i_cdev;
685 struct nvme_ns_head *head = container_of(cdev, struct nvme_ns_head, cdev);
686 int srcu_idx = srcu_read_lock(&head->srcu);
687 struct nvme_ns *ns = nvme_find_path(head);
688 int ret;
689
> 690 if (ns)
691 ret = nvme_ns_uring_cmd(ns, ioucmd, issue_flags);
692 srcu_read_unlock(&head->srcu, srcu_idx);
693 return ret;
694 }
695 #endif /* CONFIG_NVME_MULTIPATH */
696
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-05-06 5:23 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=202205061324.Uf7nd6hz-lkp@intel.com \
--to=lkp@intel.com \
--cc=anuj20.g@samsung.com \
--cc=axboe@kernel.dk \
--cc=gwml@vger.gnuweeb.org \
--cc=hch@lst.de \
--cc=joshi.k@samsung.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.