Commit e66e02c4 authored by Peng Hao's avatar Peng Hao Committed by Alex Williamson

vfio: vfio_pci_nvlink2: use a vma helper function

Use a vma helper function to simply code.
Signed-off-by: default avatarPeng Hao <richard.peng@oppo.com>
Reviewed-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent 4b2dbd56
...@@ -161,8 +161,7 @@ static int vfio_pci_nvgpu_mmap(struct vfio_pci_device *vdev, ...@@ -161,8 +161,7 @@ static int vfio_pci_nvgpu_mmap(struct vfio_pci_device *vdev,
atomic_inc(&data->mm->mm_count); atomic_inc(&data->mm->mm_count);
ret = (int) mm_iommu_newdev(data->mm, data->useraddr, ret = (int) mm_iommu_newdev(data->mm, data->useraddr,
(vma->vm_end - vma->vm_start) >> PAGE_SHIFT, vma_pages(vma), data->gpu_hpa, &data->mem);
data->gpu_hpa, &data->mem);
trace_vfio_pci_nvgpu_mmap(vdev->pdev, data->gpu_hpa, data->useraddr, trace_vfio_pci_nvgpu_mmap(vdev->pdev, data->gpu_hpa, data->useraddr,
vma->vm_end - vma->vm_start, ret); vma->vm_end - vma->vm_start, ret);
......
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