Hi Nilesh, kernel test robot noticed the following build warnings: [auto build test WARNING on char-misc/char-misc-testing] [also build test WARNING on char-misc/char-misc-next char-misc/char-misc-linus linus/master v6.7-rc8 next-20240104] [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/Nilesh-Javali/uio-introduce-UIO_MEM_DMA_COHERENT-type/20240103-171531 base: char-misc/char-misc-testing patch link: https://lore.kernel.org/r/20240103091137.27142-2-njavali%40marvell.com patch subject: [PATCH v2 1/3] uio: introduce UIO_MEM_DMA_COHERENT type config: arc-allmodconfig (https://download.01.org/0day-ci/archive/20240104/202401042222.J9GOUiYL-lkp@xxxxxxxxx/config) compiler: arceb-elf-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240104/202401042222.J9GOUiYL-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202401042222.J9GOUiYL-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): In file included from drivers/uio/uio.c:27: drivers/uio/uio.c: In function 'uio_mmap_dma_coherent': >> drivers/uio/uio.c:789:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 789 | (void *)mem->addr, | ^ include/linux/dma-mapping.h:424:63: note: in definition of macro 'dma_mmap_coherent' 424 | #define dma_mmap_coherent(d, v, c, h, s) dma_mmap_attrs(d, v, c, h, s, 0) | ^ vim +789 drivers/uio/uio.c 762 763 static int uio_mmap_dma_coherent(struct vm_area_struct *vma) 764 { 765 struct uio_device *idev = vma->vm_private_data; 766 struct uio_mem *mem; 767 int ret = 0; 768 int mi; 769 770 mi = uio_find_mem_index(vma); 771 if (mi < 0) 772 return -EINVAL; 773 774 mem = idev->info->mem + mi; 775 776 if (mem->dma_addr & ~PAGE_MASK) 777 return -ENODEV; 778 if (vma->vm_end - vma->vm_start > mem->size) 779 return -EINVAL; 780 781 /* 782 * UIO uses offset to index into the maps for a device. 783 * We need to clear vm_pgoff for dma_mmap_coherent. 784 */ 785 vma->vm_pgoff = 0; 786 787 ret = dma_mmap_coherent(&idev->dev, 788 vma, > 789 (void *)mem->addr, 790 mem->dma_addr, 791 vma->vm_end - vma->vm_start); 792 vma->vm_pgoff = mi; 793 794 return ret; 795 } 796 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki