All of lore.kernel.org
 help / color / mirror / Atom feed
* [yiliu1765-iommufd:vfio_device_cdev_v5 13/24] drivers/vfio/pci/vfio_pci_core.c:1350:7: warning: variable 'slot' set but not used
@ 2023-02-26 16:42 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-02-26 16:42 UTC (permalink / raw)
  To: Yi Liu, Kevin Tian; +Cc: oe-kbuild-all

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

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

only message in thread, other threads:[~2023-02-26 16:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-26 16:42 [yiliu1765-iommufd:vfio_device_cdev_v5 13/24] drivers/vfio/pci/vfio_pci_core.c:1350:7: warning: variable 'slot' set but not used kernel test robot

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.