projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
235266b
)
mm/interval_tree.c: use vma_pages() helper
author
Vasyl Gomonovych
<
[email protected]
>
Thu, 1 Feb 2018 00:17:03 +0000
(16:17 -0800)
committer
Linus Torvalds
<
[email protected]
>
Thu, 1 Feb 2018 01:18:37 +0000
(17:18 -0800)
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/
[email protected]
Signed-off-by: Vasyl Gomonovych <
[email protected]
>
Acked-by: Michael S. Tsirkin <
[email protected]
>
Acked-by: Davidlohr Bueso <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/interval_tree.c
patch
|
blob
|
history
diff --git
a/mm/interval_tree.c
b/mm/interval_tree.c
index b476643587966102e90813663b2039461d1dc679..27ddfd29112aeb05431a66f539b36f49455a6650 100644
(file)
--- 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,