Commit e025f059 authored by Vasyl Gomonovych's avatar Vasyl Gomonovych Committed by Linus Torvalds

mm/interval_tree.c: use vma_pages() helper

Use vma_pages function on vma object instead of explicit computation.

  mm/interval_tree.c:21:27-33: WARNING: Consider using vma_pages helper

Generated by: scripts/coccinelle/api/vma_pages.cocci

Link: http://lkml.kernel.org/r/1511364410-13499-1-git-send-email-gomonovych@gmail.comSigned-off-by: default avatarVasyl Gomonovych <gomonovych@gmail.com>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarDavidlohr Bueso <dbueso@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 235266b8
...@@ -18,7 +18,7 @@ static inline unsigned long vma_start_pgoff(struct vm_area_struct *v) ...@@ -18,7 +18,7 @@ static inline unsigned long vma_start_pgoff(struct vm_area_struct *v)
static inline unsigned long vma_last_pgoff(struct vm_area_struct *v) static inline unsigned long vma_last_pgoff(struct vm_area_struct *v)
{ {
return v->vm_pgoff + ((v->vm_end - v->vm_start) >> PAGE_SHIFT) - 1; return v->vm_pgoff + vma_pages(v) - 1;
} }
INTERVAL_TREE_DEFINE(struct vm_area_struct, shared.rb, INTERVAL_TREE_DEFINE(struct vm_area_struct, shared.rb,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment