media: videobuf2: use vma_lookup() in get_vaddr_frames()
authorLiam Howlett <liam.howlett@oracle.com>
Tue, 29 Jun 2021 02:39:29 +0000 (19:39 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Jun 2021 17:53:51 +0000 (10:53 -0700)
vma_lookup() finds the vma of a specific address with a cleaner interface
and is more readable.

Link: https://lkml.kernel.org/r/20210521174745.2219620-15-Liam.Howlett@Oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Reviewed-by: Laurent Dufour <ldufour@linux.ibm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/media/common/videobuf2/frame_vector.c

index 3811583..ce879f6 100644 (file)
@@ -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;