mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Greg Ungerer <gerg@snapgear.com>
Cc: linux-kernel@vger.kernel.org, Andy Wihitcroft <apw@shadowen.org>
Subject: Re: [PATCH] remove uneccesary page++
Date: Tue, 10 Jan 2006 18:15:57 -0800	[thread overview]
Message-ID: <1136945757.27584.5.camel@localhost.localdomain> (raw)
In-Reply-To: <200601110128.k0B1S4tU013956@localhost.localdomain>

On Wed, 2006-01-11 at 11:28 +1000, Greg Ungerer wrote:
> Remove unecessary page++ from memmap_init_zone loop.
> 
> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
> 
> 
> --- linux-2.6.15/mm/page_alloc.c	2006-01-03 13:21:10.000000000 +1000
> +++ linux-2.6.15-uc0/mm/page_alloc.c	2006-01-11 11:16:46.981376296 +1000
> @@ -1706,7 +1706,7 @@
>  	unsigned long end_pfn = start_pfn + size;
>  	unsigned long pfn;
>  
> -	for (pfn = start_pfn; pfn < end_pfn; pfn++, page++) {
> +	for (pfn = start_pfn; pfn < end_pfn; pfn++) {
>  		if (!early_pfn_valid(pfn))
>  			continue;
>  		if (!early_pfn_in_nid(pfn, nid))

You're right.  Somebody missed that when we made it re-calculate the
struct page each time.  Probably from the sparsemem updates.  You could
also take the page variable and just declare it inside that loop.  The
use appears to be local there.

                for (pfn = start_pfn; pfn < end_pfn; pfn++) {
                	struct page *page;
                        if (!early_pfn_valid(pfn))
                               continue;
                if (!early_pfn_in_nid(pfn, nid))
                        continue;
                page = pfn_to_page(pfn);


-- Dave


      reply	other threads:[~2006-01-11  2:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-11  1:28 Greg Ungerer
2006-01-11  2:15 ` Dave Hansen [this message]

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=1136945757.27584.5.camel@localhost.localdomain \
    --to=haveblue@us.ibm.com \
    --cc=apw@shadowen.org \
    --cc=gerg@snapgear.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®