Skip to contentSkip to conversation

mm/mlock.c: drop unneeded initialization in munlock_vma_pages_range()

PATCH In review Alexey Klimov 2 participants 2 messages Nov 10, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/mlock.c: drop unneeded initialization in munlock_vma_pages_range()

Before usage page pointer initialized by NULL is reinitialized by follow_page_mask(). Drop useless init of page pointer in the beginning of loop.

---
 mm/mlock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/mlock.c +1 -1
index 339d9e0..9cb87cb 100644
@@ -425,7 +425,7 @@ void munlock_vma_pages_range(struct vm_area_struct *vma,
 	vma->vm_flags &= VM_LOCKED_CLEAR_MASK;
 
 	while (start < end) {
-		struct page *page = NULL;
+		struct page *page;
 		unsigned int page_mask;
 		unsigned long page_increm;
 		struct pagevec pvec;
Signature · 7 lines
2.5.0

--
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>
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Alexey Klimov

Before usage page pointer initialized by NULL is reinitialized by follow_page_mask(). Drop useless init of page pointer in the beginning of loop.

Quoted 10 lines
---
  mm/mlock.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
mm/mlock.c +0 -0
index 339d9e0..9cb87cb 100644

mm/mlock.c void munlock_vma_pages_range(struct vm_area_struct *vma, · line 431

Quoted 8 lines
mm/mlock.c +1 -1
@@ -425,7 +425,7 @@ void munlock_vma_pages_range(struct vm_area_struct *vma,
  	vma->vm_flags &= VM_LOCKED_CLEAR_MASK;
 
  	while (start < end) {
-		struct page *page = NULL;
+		struct page *page;
  		unsigned int page_mask;
  		unsigned long page_increm;
  		struct pagevec pvec;

--
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>