mm: Use vma_pages helper
Subsystems (2)
PATCH 1/1 mm: 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
--- mm/interval_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/interval_tree.c +1 -1
@@ -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,
Signature · 7 lines
1.9.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 5 lines · Vasyl Gomonovych
Use
vma_pagesfunction on vma object instead of explicit computation. mm/interval_tree.c:21:27-33: WARNING: Consider usingvma_pageshelper Generated by:scripts/coccinelle/api/vma_pages.cocciSigned-off-by Vasyl Gomonovych <[email protected]>
Quoted 19 lines
--- mm/interval_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/interval_tree.c +1
-1@@ -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,Signature · 1 line
1.9.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 5 lines · Vasyl Gomonovych
Use
vma_pagesfunction on vma object instead of explicit computation. mm/interval_tree.c:21:27-33: WARNING: Consider usingvma_pageshelper Generated by:scripts/coccinelle/api/vma_pages.cocciSigned-off-by Vasyl Gomonovych <[email protected]>
... but you missed akpm.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>