LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Adrian Bunk <bunk@kernel.org>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: wli@holomorphy.com, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [2.6 patch] mm/hugetlb.c: fix duplicate variable
Date: Mon, 5 May 2008 23:19:27 +0300	[thread overview]
Message-ID: <20080505201927.GB1544@cs181133002.pp.htv.fi> (raw)
In-Reply-To: <2f11576a0805051311m60c0dfb5k56c04d5f4ddc04e8@mail.gmail.com>

On Tue, May 06, 2008 at 05:11:10AM +0900, KOSAKI Motohiro wrote:
> > It's confusing that set_max_huge_pages() contained two different
> >  variables named "ret", and although the code works correctly this should
> >  be fixed.
> >
> >  The inner of the two variables can simply be removed.
>                             ^^^^
> 
> two?
> I think removal inner variable is 1, no?

Two people for whom English is not the native language are trying to 
understand each other...  ;)

There were two variables.

And my patch removes the inner one inside the loop, not the outer one 
that is valid within the whole function.

> but, your change is perfectly right, IMHO.
> 
>            Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> 
> 
> >         while (count > persistent_huge_pages) {
> >  -               int ret;
> >                 /*
> >                  * If this allocation races such that we no longer need the
> >                  * page, free_huge_page will handle it by freeing the page
> >                  * and reducing the surplus.
> >                  */

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  reply	other threads:[~2008-05-05 20:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-05 18:28 Adrian Bunk
2008-05-05 20:11 ` KOSAKI Motohiro
2008-05-05 20:19   ` Adrian Bunk [this message]
2008-05-05 20:28     ` KOSAKI Motohiro
  -- strict thread matches above, loose matches on Subject: below --
2008-04-21 22:50 Adrian Bunk
2008-04-14 18:14 Adrian Bunk
2008-03-30 22:53 Adrian Bunk
2008-02-25  0:09 Adrian Bunk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080505201927.GB1544@cs181133002.pp.htv.fi \
    --to=bunk@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wli@holomorphy.com \
    --subject='Re: [2.6 patch] mm/hugetlb.c: fix duplicate variable' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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