[PATCH 13/94] media: videobuf2: Use vma_lookup() in get_vaddr_frames()

From: Liam Howlett
Date: Wed Apr 28 2021 - 11:38:43 EST


vma_lookup() does the same as find_vma_intersection() with a range of 1,
but is easier to understand.

Signed-off-by: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx>
---
drivers/media/common/videobuf2/frame_vector.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/common/videobuf2/frame_vector.c b/drivers/media/common/videobuf2/frame_vector.c
index 91fea7199e85..b84b706073cb 100644
--- a/drivers/media/common/videobuf2/frame_vector.c
+++ b/drivers/media/common/videobuf2/frame_vector.c
@@ -64,7 +64,7 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames,
do {
unsigned long *nums = frame_vector_pfns(vec);

- vma = find_vma_intersection(mm, start, start + 1);
+ vma = vma_lookup(mm, start);
if (!vma)
break;

--
2.30.2