[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202107250600.kPp9rwaT-lkp@intel.com>
Date: Sun, 25 Jul 2021 06:18:07 +0800
From: kernel test robot <lkp@...el.com>
To: Christoph Hellwig <hch@....de>
Cc: clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [hch-misc:i915-mdev 40/40] drivers/vfio/vfio.c:1649:10: warning:
incompatible integer to pointer conversion returning 'int' from a function
with result type 'struct vfio_group *'
tree: git://git.infradead.org/users/hch/misc.git i915-mdev
head: 3e7e1da34feaeb5473f397c9cab73b4eb7f6a33c
commit: 3e7e1da34feaeb5473f397c9cab73b4eb7f6a33c [40/40] vfio: improve vfio_group_get_external_user
config: arm-buildonly-randconfig-r004-20210725 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 3f2c1e99e44d028d5e9dd685f3c568f2661f2f68)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc i915-mdev
git checkout 3e7e1da34feaeb5473f397c9cab73b4eb7f6a33c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/vfio/vfio.c:1649:10: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct vfio_group *' [-Wint-conversion]
return -EBADF;
^~~~~~
1 warning generated.
vim +1649 drivers/vfio/vfio.c
1630
1631 /**
1632 * vfio_group_container_acquire_fd - acquire access to a VFIO container
1633 * by file descriptor
1634 * @fd: file descriptor to access
1635 *
1636 * Grab a reference to the VFIO container used by the VFIO group pointed to by
1637 * @fd.
1638 *
1639 * Returns the VFIO group on success or an error pointer.
1640 */
1641 struct vfio_group *vfio_group_container_acquire_fd(int fd)
1642 {
1643 struct vfio_group *group;
1644 struct fd f;
1645 int ret = -EINVAL;
1646
1647 f = fdget(fd);
1648 if (!f.file)
> 1649 return -EBADF;
1650 if (f.file->f_op != &vfio_group_fops)
1651 goto out_fdput;
1652
1653 group = f.file->private_data;
1654 ret = vfio_group_container_acquire(group);
1655 if (ret)
1656 goto out_fdput;
1657 return group;
1658
1659 out_fdput:
1660 fdput(f);
1661 return ERR_PTR(ret);
1662 }
1663 EXPORT_SYMBOL_GPL(vfio_group_container_acquire_fd);
1664
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (33155 bytes)
Powered by blists - more mailing lists