Skip to content

Commit

Permalink
samples/vfio-mdev/mdpy: use remap_vmalloc_range
Browse files Browse the repository at this point in the history
Patch series "remap_vmalloc_range cleanups".

This series removes an open coded instance of remap_vmalloc_range and
removes the unused remap_vmalloc_range_partial export.

This patch (of 2):

Use remap_vmalloc_range instead of open coding it using
remap_vmalloc_range_partial.

Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Christoph Hellwig <[email protected]>
Cc: Kirti Wankhede <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Christoph Hellwig authored and torvalds committed Apr 30, 2021
1 parent 2284f47 commit 8c2acfe
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions samples/vfio-mdev/mdpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,7 @@ static int mdpy_mmap(struct mdev_device *mdev, struct vm_area_struct *vma)
if ((vma->vm_flags & VM_SHARED) == 0)
return -EINVAL;

return remap_vmalloc_range_partial(vma, vma->vm_start,
mdev_state->memblk, 0,
vma->vm_end - vma->vm_start);
return remap_vmalloc_range(vma, mdev_state->memblk, 0);
}

static int mdpy_get_region_info(struct mdev_device *mdev,
Expand Down

0 comments on commit 8c2acfe

Please sign in to comment.