All of lore.kernel.org
 help / color / mirror / Atom feed
* remap_vmalloc_range clenaups
@ 2021-03-01  8:22 Christoph Hellwig
  2021-03-01  8:22 ` [PATCH 1/2] samples/vfio-mdev/mdpy: use remap_vmalloc_range Christoph Hellwig
  2021-03-01  8:22 ` [PATCH 2/2] mm: unexport remap_vmalloc_range_partial Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2021-03-01  8:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Kirti Wankhede, linux-mm, kvm, linux-kernel

Hi Andrew,

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] samples/vfio-mdev/mdpy: use remap_vmalloc_range
  2021-03-01  8:22 remap_vmalloc_range clenaups Christoph Hellwig
@ 2021-03-01  8:22 ` Christoph Hellwig
  2021-03-01  8:22 ` [PATCH 2/2] mm: unexport remap_vmalloc_range_partial Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2021-03-01  8:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Kirti Wankhede, linux-mm, kvm, linux-kernel

Use remap_vmalloc_range instead of open coding it using
remap_vmalloc_range_partial.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 samples/vfio-mdev/mdpy.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/samples/vfio-mdev/mdpy.c b/samples/vfio-mdev/mdpy.c
index 9894693f3be178..4fc73d0916ef7d 100644
--- a/samples/vfio-mdev/mdpy.c
+++ b/samples/vfio-mdev/mdpy.c
@@ -417,9 +417,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,
-- 
2.29.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] mm: unexport remap_vmalloc_range_partial
  2021-03-01  8:22 remap_vmalloc_range clenaups Christoph Hellwig
  2021-03-01  8:22 ` [PATCH 1/2] samples/vfio-mdev/mdpy: use remap_vmalloc_range Christoph Hellwig
@ 2021-03-01  8:22 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2021-03-01  8:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Kirti Wankhede, linux-mm, kvm, linux-kernel

remap_vmalloc_range_partial is only used to implement remap_vmalloc_range
and by procfs.  Unexport it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 mm/vmalloc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 4f5f8c907897ae..631915ff6d1b4d 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -3072,7 +3072,6 @@ int remap_vmalloc_range_partial(struct vm_area_struct *vma, unsigned long uaddr,
 
 	return 0;
 }
-EXPORT_SYMBOL(remap_vmalloc_range_partial);
 
 /**
  * remap_vmalloc_range - map vmalloc pages to userspace
-- 
2.29.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-01  8:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01  8:22 remap_vmalloc_range clenaups Christoph Hellwig
2021-03-01  8:22 ` [PATCH 1/2] samples/vfio-mdev/mdpy: use remap_vmalloc_range Christoph Hellwig
2021-03-01  8:22 ` [PATCH 2/2] mm: unexport remap_vmalloc_range_partial Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.