From: kernel test robot <lkp@intel.com>
To: Yi Liu <yi.l.liu@intel.com>, Kevin Tian <kevin.tian@intel.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [yiliu1765-iommufd:vfio_device_cdev_v5 13/24] drivers/vfio/pci/vfio_pci_core.c:1350:7: warning: variable 'slot' set but not used
Date: Mon, 27 Feb 2023 00:42:06 +0800 [thread overview]
Message-ID: <202302270022.cCVzbvMS-lkp@intel.com> (raw)
tree: https://github.com/yiliu1765/iommufd.git vfio_device_cdev_v5
head: bd79c2852f6d7b50c6049240e2b34577255cf2c7
commit: 29c5cd7a057dd29a17a05dba2e2b8e7df76279ad [13/24] vfio/pci: Allow passing zero-length fd array in vfio_pci_hot_reset
config: x86_64-randconfig-a012 (https://download.01.org/0day-ci/archive/20230227/202302270022.cCVzbvMS-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/yiliu1765/iommufd/commit/29c5cd7a057dd29a17a05dba2e2b8e7df76279ad
git remote add yiliu1765-iommufd https://github.com/yiliu1765/iommufd.git
git fetch --no-tags yiliu1765-iommufd vfio_device_cdev_v5
git checkout 29c5cd7a057dd29a17a05dba2e2b8e7df76279ad
# 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=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/vfio/pci/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302270022.cCVzbvMS-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/vfio/pci/vfio_pci_core.c:1350:7: warning: variable 'slot' set but not used [-Wunused-but-set-variable]
bool slot = false;
^
1 warning generated.
vim +/slot +1350 drivers/vfio/pci/vfio_pci_core.c
1343
1344 static int vfio_pci_ioctl_pci_hot_reset(struct vfio_pci_core_device *vdev,
1345 struct vfio_pci_hot_reset __user *arg)
1346 {
1347 unsigned long minsz = offsetofend(struct vfio_pci_hot_reset, count);
1348 struct vfio_pci_hot_reset hdr;
1349 struct iommufd_ctx *iommufd;
> 1350 bool slot = false;
1351 int ret;
1352
1353 if (copy_from_user(&hdr, arg, minsz))
1354 return -EFAULT;
1355
1356 if (hdr.argsz < minsz || hdr.flags)
1357 return -EINVAL;
1358
1359 /* Can we do a slot or bus reset or neither? */
1360 if (!pci_probe_reset_slot(vdev->pdev->slot))
1361 slot = true;
1362 else if (pci_probe_reset_bus(vdev->pdev->bus))
1363 return -ENODEV;
1364
1365 if (!hdr.count)
1366 return vfio_pci_ioctl_pci_hot_reset_groups(vdev, &hdr, arg);
1367
1368 iommufd = vfio_device_iommufd(&vdev->vdev);
1369 if (!iommufd)
1370 return -EINVAL;
1371
1372 ret = vfio_pci_dev_set_hot_reset(vdev->vdev.dev_set, NULL, iommufd);
1373 return ret;
1374 }
1375
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
reply other threads:[~2023-02-26 16:43 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=202302270022.cCVzbvMS-lkp@intel.com \
--to=lkp@intel.com \
--cc=kevin.tian@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=yi.l.liu@intel.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 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.