All of lore.kernel.org
 help / color / mirror / Atom feed
* [yiliu1765-iommufd:wip/iommufd_pasid-20240714 22/22] drivers/vfio/pci/vfio_pci_config.c:1518:1: warning: 'vfio_fill_customized_vconfig_bytes' defined but not used
@ 2024-07-14 19:34 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-07-14 19:34 UTC (permalink / raw)
  To: Yi Liu, Kevin Tian; +Cc: oe-kbuild-all

tree:   https://github.com/yiliu1765/iommufd.git wip/iommufd_pasid-20240714
head:   d39032654710dfe496616b6df763fa99ba89021d
commit: d39032654710dfe496616b6df763fa99ba89021d [22/22] vfio/pci: Report PASID capability to userspace
config: i386-randconfig-014-20240714 (https://download.01.org/0day-ci/archive/20240715/202407150308.HCG5GIBX-lkp@intel.com/config)
compiler: gcc-10 (Ubuntu 10.5.0-1ubuntu1) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240715/202407150308.HCG5GIBX-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/202407150308.HCG5GIBX-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/vfio/pci/vfio_pci_config.c:1518:1: warning: 'vfio_fill_customized_vconfig_bytes' defined but not used [-Wunused-function]
    1518 | vfio_fill_customized_vconfig_bytes(struct vfio_pci_core_device *vdev,
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/vfio_fill_customized_vconfig_bytes +1518 drivers/vfio/pci/vfio_pci_config.c

  1515	
  1516	/* Fill data to vconfig */
  1517	static void
> 1518	vfio_fill_customized_vconfig_bytes(struct vfio_pci_core_device *vdev,
  1519					   int offset, uint8_t *data, int size)
  1520	{
  1521		int filled = 0;
  1522	
  1523		while (size) {
  1524			if (size >= 4 && !(offset % 4)) {
  1525				__le32 *dwordp = (__le32 *)&vdev->vconfig[offset];
  1526				u32 dword;
  1527	
  1528				memcpy(&dword, data + filled, 4);
  1529				*dwordp = cpu_to_le32(dword);
  1530				filled = 4;
  1531			} else if (size >= 2 && !(offset % 2)) {
  1532				__le16 *wordp = (__le16 *)&vdev->vconfig[offset];
  1533				u16 word;
  1534	
  1535				memcpy(&word, data + filled, 2);
  1536				*wordp = cpu_to_le16(word);
  1537				filled = 2;
  1538			} else {
  1539				u8 *byte = &vdev->vconfig[offset];
  1540	
  1541				memcpy(byte, data + filled, 1);
  1542				filled = 1;
  1543			}
  1544	
  1545			offset += filled;
  1546			size -= filled;
  1547		}
  1548	}
  1549	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

only message in thread, other threads:[~2024-07-14 19:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-14 19:34 [yiliu1765-iommufd:wip/iommufd_pasid-20240714 22/22] drivers/vfio/pci/vfio_pci_config.c:1518:1: warning: 'vfio_fill_customized_vconfig_bytes' defined 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.