[PATCH 4/4] nvme: wire up async polling for io passthrough commands
kernel test robot
lkp at intel.com
Fri Aug 5 17:06:02 PDT 2022
Hi Kanchan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on axboe-block/for-next]
[also build test WARNING on linus/master next-20220805]
[cannot apply to hch-configfs/for-next v5.19]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Kanchan-Joshi/fs-add-file_operations-uring_cmd_iopoll/20220806-004320
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: i386-randconfig-a002 (https://download.01.org/0day-ci/archive/20220806/202208060733.GCwasLXB-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 26dd42705c2af0b8f6e5d6cdb32c9bd5ed9524eb)
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/intel-lab-lkp/linux/commit/0964795577fbf09d8b315269504b5e87b5ac492b
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Kanchan-Joshi/fs-add-file_operations-uring_cmd_iopoll/20220806-004320
git checkout 0964795577fbf09d8b315269504b5e87b5ac492b
# 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=i386 SHELL=/bin/bash drivers/nvme/host/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp at intel.com>
All warnings (new ones prefixed by >>):
>> drivers/nvme/host/ioctl.c:638:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (test_bit(QUEUE_FLAG_POLL, &q->queue_flags) && bio && bio->bi_bdev)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/nvme/host/ioctl.c:641:9: note: uninitialized use occurs here
return ret;
^~~
drivers/nvme/host/ioctl.c:638:2: note: remove the 'if' if its condition is always true
if (test_bit(QUEUE_FLAG_POLL, &q->queue_flags) && bio && bio->bi_bdev)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/nvme/host/ioctl.c:638:6: warning: variable 'ret' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
if (test_bit(QUEUE_FLAG_POLL, &q->queue_flags) && bio && bio->bi_bdev)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/nvme/host/ioctl.c:641:9: note: uninitialized use occurs here
return ret;
^~~
drivers/nvme/host/ioctl.c:638:6: note: remove the '&&' if its condition is always true
if (test_bit(QUEUE_FLAG_POLL, &q->queue_flags) && bio && bio->bi_bdev)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/nvme/host/ioctl.c:638:6: warning: variable 'ret' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
if (test_bit(QUEUE_FLAG_POLL, &q->queue_flags) && bio && bio->bi_bdev)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/nvme/host/ioctl.c:641:9: note: uninitialized use occurs here
return ret;
^~~
drivers/nvme/host/ioctl.c:638:6: note: remove the '&&' if its condition is always true
if (test_bit(QUEUE_FLAG_POLL, &q->queue_flags) && bio && bio->bi_bdev)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/nvme/host/ioctl.c:629:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
3 warnings generated.
vim +638 drivers/nvme/host/ioctl.c
625
626 int nvme_ns_chr_uring_cmd_iopoll(struct io_uring_cmd *ioucmd)
627 {
628 struct bio *bio;
629 int ret;
630 struct nvme_ns *ns;
631 struct request_queue *q;
632
633 rcu_read_lock();
634 bio = READ_ONCE(ioucmd->cookie);
635 ns = container_of(file_inode(ioucmd->file)->i_cdev,
636 struct nvme_ns, cdev);
637 q = ns->queue;
> 638 if (test_bit(QUEUE_FLAG_POLL, &q->queue_flags) && bio && bio->bi_bdev)
639 ret = bio_poll(bio, 0, 0);
640 rcu_read_unlock();
641 return ret;
642 }
643 #ifdef CONFIG_NVME_MULTIPATH
644 static int nvme_ns_head_ctrl_ioctl(struct nvme_ns *ns, unsigned int cmd,
645 void __user *argp, struct nvme_ns_head *head, int srcu_idx)
646 __releases(&head->srcu)
647 {
648 struct nvme_ctrl *ctrl = ns->ctrl;
649 int ret;
650
651 nvme_get_ctrl(ns->ctrl);
652 srcu_read_unlock(&head->srcu, srcu_idx);
653 ret = nvme_ctrl_ioctl(ns->ctrl, cmd, argp);
654
655 nvme_put_ctrl(ctrl);
656 return ret;
657 }
658
--
0-DAY CI Kernel Test Service
https://01.org/lkp
More information about the Linux-nvme
mailing list