Hi Rob,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.19-rc8]
[cannot apply to drm-misc/drm-misc-next drm/drm-next drm-exynos/exynos-drm-next 
drm-intel/for-linux-next drm-tip/drm-tip next-20220728]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    
https://github.com/intel-lab-lkp/linux/commits/Rob-Clark/dma-buf-map-info-support/20220730-010844
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
6e2c0490769ef8a95b61304389116ccc85c53e12
config: m68k-randconfig-s032-20220729 
(https://download.01.org/0day-ci/archive/20220730/202207301057.kvtytw6h-...@intel.com/config)
compiler: m68k-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/intel-lab-lkp/linux/commit/203f14a73a179d6c5fbfa4813e45fde2a9ae9860
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review 
Rob-Clark/dma-buf-map-info-support/20220730-010844
        git checkout 203f14a73a179d6c5fbfa4813e45fde2a9ae9860
        # 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=m68k 
SHELL=/bin/bash

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

sparse warnings: (new ones prefixed by >>)
>> drivers/dma-buf/dma-buf.c:346:26: sparse: sparse: incorrect type in argument 
>> 1 (different modifiers) @@     expected void [noderef] __user *to @@     got 
>> void const [noderef] __user *uarg @@
   drivers/dma-buf/dma-buf.c:346:26: sparse:     expected void [noderef] __user 
*to
   drivers/dma-buf/dma-buf.c:346:26: sparse:     got void const [noderef] 
__user *uarg

vim +346 drivers/dma-buf/dma-buf.c

   328  
   329  static long dma_buf_info(struct dma_buf *dmabuf, const void __user 
*uarg)
   330  {
   331          struct dma_buf_info arg;
   332  
   333          if (copy_from_user(&arg, uarg, sizeof(arg)))
   334                  return -EFAULT;
   335  
   336          switch (arg.param) {
   337          case DMA_BUF_INFO_VM_PROT:
   338                  if (!dmabuf->ops->mmap_info)
   339                          return -ENOSYS;
   340                  arg.value = dmabuf->ops->mmap_info(dmabuf);
   341                  break;
   342          default:
   343                  return -EINVAL;
   344          }
   345  
 > 346          if (copy_to_user(uarg, &arg, sizeof(arg)))
   347                  return -EFAULT;
   348  
   349          return 0;
   350  }
   351  

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

Reply via email to