Re: [PATCH] vringh: use bvec_kmap_local

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Christoph,

kernel test robot noticed the following build errors:

[auto build test ERROR on mst-vhost/linux-next]
[also build test ERROR on linus/master v6.15-rc4 next-20250430]
[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/Christoph-Hellwig/vringh-use-bvec_kmap_local/20250430-220531
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
patch link:    https://lore.kernel.org/r/20250430140004.2724391-1-hch%40lst.de
patch subject: [PATCH] vringh: use bvec_kmap_local
config: arm64-randconfig-002-20250501 (https://download.01.org/0day-ci/archive/20250501/202505011849.E2H9cM7C-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250501/202505011849.E2H9cM7C-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/202505011849.E2H9cM7C-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/vhost/vringh.c: In function 'putu16_iotlb':
>> drivers/vhost/vringh.c:1332:36: error: passing argument 1 of 'kmap_local_page' from incompatible pointer type [-Werror=incompatible-pointer-types]
      __virtio16 *to = kmap_local_page(&ivec.iov.bvec[0]);
                                       ^
   In file included from include/linux/highmem.h:14:0,
                    from include/linux/bvec.h:10,
                    from drivers/vhost/vringh.c:17:
   include/linux/highmem-internal.h:178:21: note: expected 'struct page *' but argument is of type 'struct bio_vec *'
    static inline void *kmap_local_page(struct page *page)
                        ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/kmap_local_page +1332 drivers/vhost/vringh.c

  1304	
  1305	static inline int putu16_iotlb(const struct vringh *vrh,
  1306				       __virtio16 *p, u16 val)
  1307	{
  1308		struct iotlb_vec ivec;
  1309		union {
  1310			struct iovec iovec;
  1311			struct bio_vec bvec;
  1312		} iov;
  1313		__virtio16 tmp;
  1314		int ret;
  1315	
  1316		ivec.iov.iovec = &iov.iovec;
  1317		ivec.count = 1;
  1318	
  1319		/* Atomic write is needed for putu16 */
  1320		ret = iotlb_translate(vrh, (u64)(uintptr_t)p, sizeof(*p),
  1321				      NULL, &ivec, VHOST_MAP_RO);
  1322		if (ret < 0)
  1323			return ret;
  1324	
  1325		tmp = cpu_to_vringh16(vrh, val);
  1326	
  1327		if (vrh->use_va) {
  1328			ret = __put_user(tmp, (__virtio16 __user *)ivec.iov.iovec[0].iov_base);
  1329			if (ret)
  1330				return ret;
  1331		} else {
> 1332			__virtio16 *to = kmap_local_page(&ivec.iov.bvec[0]);
  1333	
  1334			WRITE_ONCE(*to, tmp);
  1335			kunmap_local(to);
  1336		}
  1337	
  1338		return 0;
  1339	}
  1340	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux