summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasyl Gomonovych <gomonovych@gmail.com>2017-11-29 12:15:13 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2017-11-29 12:15:13 +1100
commitbefe3359aee23efa04f6506135a91b490613d514 (patch)
tree583a0beafb1b2c5f991b8fb88308e3dcbbb88f86
parentf967b361f1223fa85e65feb70e635cb9eef761ff (diff)
downloadlinux-befe3359aee23efa04f6506135a91b490613d514.tar.gz
linux-befe3359aee23efa04f6506135a91b490613d514.tar.xz
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.com Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Davidlohr Bueso <dbueso@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
-rw-r--r--mm/interval_tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/interval_tree.c b/mm/interval_tree.c
index b47664358796..27ddfd29112a 100644
--- a/mm/interval_tree.c
+++ b/mm/interval_tree.c
@@ -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)
{
- 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,