* [yiliu1765-iommufd:tmp/for-baol-0303 32/53] drivers/iommu/iommufd/device.c:247:33: warning: cast to pointer from integer of different size
@ 2023-03-03 5:21 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-03 5:21 UTC (permalink / raw)
To: Yi Liu, Kevin Tian; +Cc: oe-kbuild-all
tree: https://github.com/yiliu1765/iommufd.git tmp/for-baol-0303
head: 028abaf51f935755b020cbb2c8f196862dd3a312
commit: ff36dc2e826bee1bb7c880b6fdd9612a7b13af24 [32/53] iommufd: Add IOMMU_DEVICE_GET_INFO
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230303/202303031326.Apfli8PI-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.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/yiliu1765/iommufd/commit/ff36dc2e826bee1bb7c880b6fdd9612a7b13af24
git remote add yiliu1765-iommufd https://github.com/yiliu1765/iommufd.git
git fetch --no-tags yiliu1765-iommufd tmp/for-baol-0303
git checkout ff36dc2e826bee1bb7c880b6fdd9612a7b13af24
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k 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>
| Link: https://lore.kernel.org/oe-kbuild-all/202303031326.Apfli8PI-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/huge_mm.h:8,
from include/linux/mm.h:746,
from include/linux/scatterlist.h:8,
from include/linux/iommu.h:10,
from drivers/iommu/iommufd/device.c:6:
drivers/iommu/iommufd/device.c: In function 'iommufd_zero_fill_user':
>> drivers/iommu/iommufd/device.c:247:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
247 | if (put_user(0, (uint8_t __user *)(ptr + index)))
| ^
arch/m68k/include/asm/uaccess.h:81:18: note: in definition of macro '__put_user'
81 | typeof(*(ptr)) __pu_val = (x); \
| ^~~
drivers/iommu/iommufd/device.c:247:21: note: in expansion of macro 'put_user'
247 | if (put_user(0, (uint8_t __user *)(ptr + index)))
| ^~~~~~~~
>> drivers/iommu/iommufd/device.c:247:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
247 | if (put_user(0, (uint8_t __user *)(ptr + index)))
| ^
arch/m68k/include/asm/uaccess.h:84:27: note: in definition of macro '__put_user'
84 | switch (sizeof (*(ptr))) { \
| ^~~
drivers/iommu/iommufd/device.c:247:21: note: in expansion of macro 'put_user'
247 | if (put_user(0, (uint8_t __user *)(ptr + index)))
| ^~~~~~~~
>> drivers/iommu/iommufd/device.c:247:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
247 | if (put_user(0, (uint8_t __user *)(ptr + index)))
| ^
arch/m68k/include/asm/uaccess.h:46:31: note: in definition of macro '__put_user_asm'
46 | : "+d" (res), "=m" (*(ptr)) \
| ^~~
arch/m68k/include/asm/uaccess.h:102:33: note: in expansion of macro '__put_user'
102 | #define put_user(x, ptr) __put_user(x, ptr)
| ^~~~~~~~~~
drivers/iommu/iommufd/device.c:247:21: note: in expansion of macro 'put_user'
247 | if (put_user(0, (uint8_t __user *)(ptr + index)))
| ^~~~~~~~
>> drivers/iommu/iommufd/device.c:247:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
247 | if (put_user(0, (uint8_t __user *)(ptr + index)))
| ^
arch/m68k/include/asm/uaccess.h:46:31: note: in definition of macro '__put_user_asm'
46 | : "+d" (res), "=m" (*(ptr)) \
| ^~~
arch/m68k/include/asm/uaccess.h:102:33: note: in expansion of macro '__put_user'
102 | #define put_user(x, ptr) __put_user(x, ptr)
| ^~~~~~~~~~
drivers/iommu/iommufd/device.c:247:21: note: in expansion of macro 'put_user'
247 | if (put_user(0, (uint8_t __user *)(ptr + index)))
| ^~~~~~~~
>> drivers/iommu/iommufd/device.c:247:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
247 | if (put_user(0, (uint8_t __user *)(ptr + index)))
| ^
arch/m68k/include/asm/uaccess.h:46:31: note: in definition of macro '__put_user_asm'
46 | : "+d" (res), "=m" (*(ptr)) \
| ^~~
arch/m68k/include/asm/uaccess.h:102:33: note: in expansion of macro '__put_user'
102 | #define put_user(x, ptr) __put_user(x, ptr)
| ^~~~~~~~~~
drivers/iommu/iommufd/device.c:247:21: note: in expansion of macro 'put_user'
247 | if (put_user(0, (uint8_t __user *)(ptr + index)))
| ^~~~~~~~
>> drivers/iommu/iommufd/device.c:247:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
247 | if (put_user(0, (uint8_t __user *)(ptr + index)))
| ^
arch/m68k/include/asm/uaccess.h:51:55: note: in definition of macro '__put_user_asm8'
51 | const void *__pu_ptr = (const void __force *)(ptr); \
| ^~~
arch/m68k/include/asm/uaccess.h:102:33: note: in expansion of macro '__put_user'
102 | #define put_user(x, ptr) __put_user(x, ptr)
| ^~~~~~~~~~
drivers/iommu/iommufd/device.c:247:21: note: in expansion of macro 'put_user'
247 | if (put_user(0, (uint8_t __user *)(ptr + index)))
| ^~~~~~~~
vim +247 drivers/iommu/iommufd/device.c
241
242 static int iommufd_zero_fill_user(u64 ptr, int bytes)
243 {
244 int index = 0;
245
246 for (; index < bytes; index++) {
> 247 if (put_user(0, (uint8_t __user *)(ptr + index)))
248 return -EFAULT;
249 }
250 return 0;
251 }
252
--
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-03-03 5:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-03 5:21 [yiliu1765-iommufd:tmp/for-baol-0303 32/53] drivers/iommu/iommufd/device.c:247:33: warning: cast to pointer from integer of different size 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.