Skip to content

Commit

Permalink
vfio: vfio_pci_nvlink2: use a vma helper function
Browse files Browse the repository at this point in the history
Use a vma helper function to simply code.

Signed-off-by: Peng Hao <[email protected]>
Reviewed-by: Alexey Kardashevskiy <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
  • Loading branch information
Peng Hao authored and awilliam committed Jul 2, 2019
1 parent 4b2dbd5 commit e66e02c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/vfio/pci/vfio_pci_nvlink2.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ static int vfio_pci_nvgpu_mmap(struct vfio_pci_device *vdev,

atomic_inc(&data->mm->mm_count);
ret = (int) mm_iommu_newdev(data->mm, data->useraddr,
(vma->vm_end - vma->vm_start) >> PAGE_SHIFT,
data->gpu_hpa, &data->mem);
vma_pages(vma), data->gpu_hpa, &data->mem);

trace_vfio_pci_nvgpu_mmap(vdev->pdev, data->gpu_hpa, data->useraddr,
vma->vm_end - vma->vm_start, ret);
Expand Down

0 comments on commit e66e02c

Please sign in to comment.