mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Wizard <wizarddewhite@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: Seems the comment of find_next_system_ram() is not exact
Date: Sun, 25 Sep 2011 11:42:22 +0200	[thread overview]
Message-ID: <20110925094222.GA11289@liondog.tnic> (raw)
In-Reply-To: <CAOkaeLJTeewFWpHCVBqNwmuL7nEbFYnrQ86SQOO7fVg_Uc3Q4Q@mail.gmail.com>

On Sat, Sep 24, 2011 at 09:40:52PM +0800, Wizard wrote:
> Hi, Experts
> 
> I am a newbie for linux kernel. I just read the code of
> find_next_system_ram() in kernel/resource.c
> 
> I think the comment of this function is not exact. This says "Finds
> the lowest memory reosurce exists within [res->start.res->end)".
> 
> While I think the code is to find the lowest memory resource overlaps
> [res->start, res->end).
> 
> 308:      if ((p->end >= start) && (p->start < end))
> 
> If I am not correct, please let me know. :)

Right,

hint for the future, do a "git annotate" on the file containing that
code - the patch adding the piece of code might (err, and should!) have
a verbose commit message explaining the situation. And it seems it does
have something to a degree, here's another hint:

58c1b5b079071

:-)

But I agree that the comment over the function could use some more
verbosity on why the function needs to handle overlapping resources and
sections. Let's ask the author.

> BTW, I find the "reosurce" is a typo.

Yes, he could fix it while explaining the overlap :-).

HTH.

-- 
Regards/Gruss,
    Boris.

  reply	other threads:[~2011-09-25  9:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-24 13:40 Wizard
2011-09-25  9:42 ` Borislav Petkov [this message]
2011-09-25 15:02   ` Wizard
2011-09-25 20:09     ` Borislav Petkov
2011-09-26  0:26     ` KAMEZAWA Hiroyuki

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=20110925094222.GA11289@liondog.tnic \
    --to=bp@alien8.de \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wizarddewhite@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®