All of lore.kernel.org
 help / color / mirror / Atom feed
* [yiliu1765-iommufd:wip/iommufd-v6.2-rc4-nesting 19/43] drivers/iommu/iommufd/device.c:140:21: sparse: sparse: non size-preserving integer to pointer cast
@ 2023-01-22  6:09 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-01-22  6:09 UTC (permalink / raw)
  To: Yi Liu, Kevin Tian; +Cc: oe-kbuild-all

tree:   https://github.com/yiliu1765/iommufd.git wip/iommufd-v6.2-rc4-nesting
head:   88fc43f83ab9bb5590e8f8f974e6b2958bf9b65d
commit: 780ff179e3d77515319b240ba246a691d9365477 [19/43] iommufd: Add IOMMU_DEVICE_GET_INFO
config: csky-randconfig-s041-20230122 (https://download.01.org/0day-ci/archive/20230122/202301221445.kamShCvg-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/yiliu1765/iommufd/commit/780ff179e3d77515319b240ba246a691d9365477
        git remote add yiliu1765-iommufd https://github.com/yiliu1765/iommufd.git
        git fetch --no-tags yiliu1765-iommufd wip/iommufd-v6.2-rc4-nesting
        git checkout 780ff179e3d77515319b240ba246a691d9365477
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=csky olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=csky SHELL=/bin/bash drivers/iommu/iommufd/

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

sparse warnings: (new ones prefixed by >>)
   drivers/iommu/iommufd/device.c: note: in included file (through include/linux/uaccess.h, include/linux/sched/task.h, include/linux/sched/signal.h, ...):
   arch/csky/include/asm/uaccess.h:110:17: sparse: sparse: cast removes address space '__user' of expression
   arch/csky/include/asm/uaccess.h:110:17: sparse: sparse: asm output is not an lvalue
   arch/csky/include/asm/uaccess.h:110:17: sparse: sparse: cast removes address space '__user' of expression
>> drivers/iommu/iommufd/device.c:140:21: sparse: sparse: non size-preserving integer to pointer cast
   arch/csky/include/asm/uaccess.h:110:17: sparse: sparse: generating address of non-lvalue (11)

vim +140 drivers/iommu/iommufd/device.c

   134	
   135	static int iommufd_zero_fill_user(u64 ptr, int bytes)
   136	{
   137		int index = 0;
   138	
   139		for (; index < bytes; index++) {
 > 140			if (put_user(0, (uint8_t __user *)(ptr + index)))
   141				return -EFAULT;
   142		}
   143		return 0;
   144	}
   145	

-- 
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-01-22  6:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-22  6:09 [yiliu1765-iommufd:wip/iommufd-v6.2-rc4-nesting 19/43] drivers/iommu/iommufd/device.c:140:21: sparse: sparse: non size-preserving integer to pointer cast 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.