All of lore.kernel.org
 help / color / mirror / Atom feed
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: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
Date: Mon, 15 Jul 2024 03:34:30 +0800	[thread overview]
Message-ID: <202407150308.HCG5GIBX-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-07-14 19:35 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=202407150308.HCG5GIBX-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.