Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1220134

Re: [PATCH] mm/mmap.c: Remove useless statement "vma = NULL" in find_vma()

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] mm/mmap.c: Remove useless statement "vma = NULL" in find_vma()
Date 2015-09-07 14:40 +0200
Message-ID <q63Si-5E0-25@gated-at.bofh.it> (permalink)
References <q5mki-2Hy-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/05, Chen Gang wrote:
>
> 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>

Reviewed-by: Oleg Nesterov <oleg@redhat.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
>
>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mm/mmap.c: Remove useless statement "vma = NULL" in   find_vma() Chen Gang <xili_gchen_5257@hotmail.com> - 2015-09-05 16:10 +0200
  Re: [PATCH] mm/mmap.c: Remove useless statement "vma = NULL" in  find_vma() Oleg Nesterov <oleg@redhat.com> - 2015-09-07 14:40 +0200
  Re: [PATCH] mm/mmap.c: Remove useless statement "vma = NULL" in  find_vma() Chen Gang <xili_gchen_5257@hotmail.com> - 2015-09-08 16:20 +0200
    Re: [PATCH] mm/mmap.c: Remove useless statement "vma = NULL" in  find_vma() Oleg Nesterov <oleg@redhat.com> - 2015-09-09 18:30 +0200
    Re: [PATCH] mm/mmap.c: Remove useless statement "vma = NULL" in  find_vma() Chen Gang <xili_gchen_5257@hotmail.com> - 2015-09-10 00:50 +0200
      Re: [PATCH] mm/mmap.c: Remove useless statement "vma = NULL" in  find_vma() Oleg Nesterov <oleg@redhat.com> - 2015-09-10 20:30 +0200
        Re: [PATCH] mm/mmap.c: Remove useless statement "vma = NULL" in find_vma() Chen Gang <xili_gchen_5257@hotmail.com> - 2015-09-11 00:20 +0200
  Re: [PATCH] mm/mmap.c: Remove useless statement "vma = NULL" in   find_vma() David Rientjes <rientjes@google.com> - 2015-09-09 01:20 +0200

csiph-web