linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [jgunthorpe:vfio_kvm_no_group 2/11] arch/powerpc/kvm/../../../virt/kvm/vfio.c:356:58: error: cast to pointer from integer of different size
@ 2022-04-15 20:08 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-15 20:08 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: kbuild-all, linux-kernel

tree:   https://github.com/jgunthorpe/linux vfio_kvm_no_group
head:   0a779a04652d97c98d71a1538a37f89145dba9ed
commit: c068aae365aaf0ecde7abf0842298c59d7ed0d9c [2/11] kvm/vfio: Reduce the scope of PPC #ifdefs
config: powerpc-randconfig-c003-20220414 (https://download.01.org/0day-ci/archive/20220416/202204160410.A4xlb0e3-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 11.2.0
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/jgunthorpe/linux/commit/c068aae365aaf0ecde7abf0842298c59d7ed0d9c
        git remote add jgunthorpe https://github.com/jgunthorpe/linux
        git fetch --no-tags jgunthorpe vfio_kvm_no_group
        git checkout c068aae365aaf0ecde7abf0842298c59d7ed0d9c
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   arch/powerpc/kvm/../../../virt/kvm/vfio.c: In function 'kvm_vfio_set_group':
>> arch/powerpc/kvm/../../../virt/kvm/vfio.c:356:58: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     356 |                 return kvm_vfio_group_set_spapr_tce(dev, (void __user *)arg);
         |                                                          ^
   cc1: all warnings being treated as errors


vim +356 arch/powerpc/kvm/../../../virt/kvm/vfio.c

26d16e3ba7292b Jason Gunthorpe 2022-03-30  338  
26d16e3ba7292b Jason Gunthorpe 2022-03-30  339  static int kvm_vfio_set_group(struct kvm_device *dev, long attr, u64 arg)
26d16e3ba7292b Jason Gunthorpe 2022-03-30  340  {
26d16e3ba7292b Jason Gunthorpe 2022-03-30  341  	int32_t __user *argp = (int32_t __user *)(unsigned long)arg;
26d16e3ba7292b Jason Gunthorpe 2022-03-30  342  	int32_t fd;
26d16e3ba7292b Jason Gunthorpe 2022-03-30  343  
26d16e3ba7292b Jason Gunthorpe 2022-03-30  344  	switch (attr) {
26d16e3ba7292b Jason Gunthorpe 2022-03-30  345  	case KVM_DEV_VFIO_GROUP_ADD:
26d16e3ba7292b Jason Gunthorpe 2022-03-30  346  		if (get_user(fd, argp))
26d16e3ba7292b Jason Gunthorpe 2022-03-30  347  			return -EFAULT;
26d16e3ba7292b Jason Gunthorpe 2022-03-30  348  		return kvm_vfio_group_add(dev, fd);
26d16e3ba7292b Jason Gunthorpe 2022-03-30  349  
26d16e3ba7292b Jason Gunthorpe 2022-03-30  350  	case KVM_DEV_VFIO_GROUP_DEL:
26d16e3ba7292b Jason Gunthorpe 2022-03-30  351  		if (get_user(fd, argp))
26d16e3ba7292b Jason Gunthorpe 2022-03-30  352  			return -EFAULT;
26d16e3ba7292b Jason Gunthorpe 2022-03-30  353  		return kvm_vfio_group_del(dev, fd);
26d16e3ba7292b Jason Gunthorpe 2022-03-30  354  
26d16e3ba7292b Jason Gunthorpe 2022-03-30  355  	case KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE:
26d16e3ba7292b Jason Gunthorpe 2022-03-30 @356  		return kvm_vfio_group_set_spapr_tce(dev, (void __user *)arg);
ec53500fae421e Alex Williamson 2013-10-30  357  	}
ec53500fae421e Alex Williamson 2013-10-30  358  
ec53500fae421e Alex Williamson 2013-10-30  359  	return -ENXIO;
ec53500fae421e Alex Williamson 2013-10-30  360  }
ec53500fae421e Alex Williamson 2013-10-30  361  

:::::: The code at line 356 was first introduced by commit
:::::: 26d16e3ba7292b7fce26d25a2ba8f44b8c28ffe3 kvm/vfio: Move KVM_DEV_VFIO_GROUP_* ioctls into functions

:::::: TO: Jason Gunthorpe <jgg@nvidia.com>
:::::: CC: Jason Gunthorpe <jgg@nvidia.com>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

only message in thread, other threads:[~2022-04-15 20:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-15 20:08 [jgunthorpe:vfio_kvm_no_group 2/11] arch/powerpc/kvm/../../../virt/kvm/vfio.c:356:58: error: cast to pointer from integer of different size kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).