linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/mmap.c: Remove useless statement "vma = NULL" in find_vma()
@ 2015-09-05 14:03 Chen Gang
  2015-09-07 12:36 ` Oleg Nesterov
  2015-09-08 23:14 ` David Rientjes
  0 siblings, 2 replies; 10+ messages in thread
From: Chen Gang @ 2015-09-05 14:03 UTC (permalink / raw)
  To: Andrew Morton, kirill.shutemov@linux.intel.com, riel@redhat.com,
	Michal Hocko, oleg@redhat.com, sasha.levin@oracle.com,
	pfeiner@google.com, aarcange@redhat.com, vishnu.ps@samsung.com,
	Linux Memory, kernel mailing list

[-- Attachment #1: Type: text/plain, Size: 786 bytes --]


>From b12fa5a9263cf4c044988e59f0071f4bcc132215 Mon Sep 17 00:00:00 2001
From: Chen Gang <gang.chen.5i5j@gmail.com>
Date: Sat, 5 Sep 2015 21:49:56 +0800
Subject: [PATCH] mm/mmap.c: Remove useless statement "vma = NULL" in
 find_vma()

Before the main looping, vma is already is NULL, so need not set it to
NULL, again.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 mm/mmap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/mmap.c b/mm/mmap.c
index df6d5f0..4db7cf0 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2054,7 +2054,6 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
 		return vma;
 
 	rb_node = mm->mm_rb.rb_node;
-	vma = NULL;
 
 	while (rb_node) {
 		struct vm_area_struct *tmp;
-- 
1.9.3

 		 	   		  

[-- Attachment #2: 0001-mm-mmap.c-Remove-useless-statement-vma-NULL-in-find_.patch --]
[-- Type: application/octet-stream, Size: 746 bytes --]

From b12fa5a9263cf4c044988e59f0071f4bcc132215 Mon Sep 17 00:00:00 2001
From: Chen Gang <gang.chen.5i5j@gmail.com>
Date: Sat, 5 Sep 2015 21:49:56 +0800
Subject: [PATCH 1/2] mm/mmap.c: Remove useless statement "vma = NULL" in
 find_vma()

Before the main looping, vma is already is NULL, so need not set it to
NULL, again.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 mm/mmap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/mmap.c b/mm/mmap.c
index df6d5f0..4db7cf0 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2054,7 +2054,6 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
 		return vma;
 
 	rb_node = mm->mm_rb.rb_node;
-	vma = NULL;
 
 	while (rb_node) {
 		struct vm_area_struct *tmp;
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] mm/mmap.c: Remove useless statement "vma = NULL" in find_vma()
@ 2015-09-03  3:52 gang.chen.5i5j
  2015-09-03  4:02 ` Chen Gang
  0 siblings, 1 reply; 10+ messages in thread
From: gang.chen.5i5j @ 2015-09-03  3:52 UTC (permalink / raw)
  To: akpm, mhocko; +Cc: linux-mm, linux-kernel, gchen_5i5j, Chen Gang

From: Chen Gang <gang.chen.5i5j@gmail.com>

Before the main looping, vma is already is NULL, so need not set it to
NULL, again.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 mm/mmap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/mmap.c b/mm/mmap.c
index df6d5f0..4db7cf0 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2054,7 +2054,6 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
 		return vma;
 
 	rb_node = mm->mm_rb.rb_node;
-	vma = NULL;
 
 	while (rb_node) {
 		struct vm_area_struct *tmp;
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-09-10 22:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-05 14:03 [PATCH] mm/mmap.c: Remove useless statement "vma = NULL" in find_vma() Chen Gang
2015-09-07 12:36 ` Oleg Nesterov
     [not found]   ` <55EEED66.6090509@hotmail.com>
2015-09-08 14:14     ` Chen Gang
2015-09-09 16:26       ` Oleg Nesterov
     [not found]         ` <55F0B6C2.2000706@hotmail.com>
2015-09-09 22:44           ` Chen Gang
2015-09-10 18:19             ` Oleg Nesterov
2015-09-10 22:20               ` Chen Gang
2015-09-08 23:14 ` David Rientjes
  -- strict thread matches above, loose matches on Subject: below --
2015-09-03  3:52 gang.chen.5i5j
2015-09-03  4:02 ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).