Commit c8e9df47 authored by Kirti Wankhede's avatar Kirti Wankhede Committed by Alex Williamson

vfio iommu: typecast corrections

Fixes sparse warnings by adding '__user' in typecast for
copy_[from,to]_user()

Fixes: d6a4c185 ("vfio iommu: Implementation of ioctl for dirty pages tracking")
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarKirti Wankhede <kwankhede@nvidia.com>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent cd0bb41e
......@@ -998,14 +998,14 @@ static int update_user_bitmap(u64 __user *bitmap, struct vfio_iommu *iommu,
nbits + shift);
if (copy_from_user(&leftover,
(const void *)(bitmap + copy_offset),
(void __user *)(bitmap + copy_offset),
sizeof(leftover)))
return -EFAULT;
bitmap_or(dma->bitmap, dma->bitmap, &leftover, shift);
}
if (copy_to_user((void *)(bitmap + copy_offset), dma->bitmap,
if (copy_to_user((void __user *)(bitmap + copy_offset), dma->bitmap,
DIRTY_BITMAP_BYTES(nbits + shift)))
return -EFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment