On Sat, Nov 05, 2022 at 08:07:24AM +0800, Baolu Lu wrote: > If you fix the issue, kindly add following tag where applicable > | Reported-by: kernel test robot <lkp@xxxxxxxxx> > > sparse warnings: (new ones prefixed by >>) > >> drivers/iommu/iommufd/vfio_compat.c:294:17: sparse: sparse: cast removes > address space '__user' of expression > > vim +/__user +294 drivers/iommu/iommufd/vfio_compat.c > > 288 > 289 static int iommufd_fill_cap_iova(struct iommufd_ioas *ioas, > 290 struct vfio_info_cap_header __user *cur, > 291 size_t avail) > 292 { > 293 struct vfio_iommu_type1_info_cap_iova_range __user *ucap_iovas = > > 294 container_of(cur, > 295 struct vfio_iommu_type1_info_cap_iova_range __user, > 296 header); I think this is correct as-written. Sparse is flagging the casting inside container_of. I don't think ti is worth trying to fix Jason