All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Yinghai Lu <Yinghai.Lu@Sun.COM>
Cc: Christoph Lameter <clameter@sgi.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86_64: cleanup setup_node_zones called by paging_init v2
Date: Wed, 09 Jan 2008 11:11:40 -0800	[thread overview]
Message-ID: <1199905900.9834.96.camel@localhost> (raw)
In-Reply-To: <200801091030.40545.yinghai.lu@sun.com>

On Wed, 2008-01-09 at 10:30 -0800, Yinghai Lu wrote:
> 
> [PATCH] x86_64: cleanup setup_node_zones called by paging_init v2
> 
> setup_node_zones calcuates some variable but only use them when
> FLAT_NODE_MEM_MAP is set
> 
> so change the MACRO postion to avoid calculating.
> 
> also change it to static 

I just see the patch adding a net of one #ifdef (and 3 lines of .c
file), and I don't consider that a cleanup. :(

If you make the function static, and make sure to cover that Dprintk up
with the #ifdef, I think the compiler should take care of the rest and
just throw away the function.  Then, you won't need to add the second
#ifdef.  You can even kill the brackets in that for loop.

Also, if you're going to be mucking around in there, can you give
setup_node_zones() a better name?  It doesn't exactly setup any zones
any more.  alloc_node_mem_map(), perhaps?  The comment above it is
bogus, too.

-- Dave


  reply	other threads:[~2008-01-09 19:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-09  3:34 [PATCH] x86_64: cleanup setup_node_zones called by paging_init Yinghai Lu
2008-01-09 17:49 ` Christoph Lameter
2008-01-09 18:30   ` [PATCH] x86_64: cleanup setup_node_zones called by paging_init v2 Yinghai Lu
2008-01-09 19:11     ` Dave Hansen [this message]
2008-01-09 19:19     ` Christoph Lameter
2008-01-09 20:34       ` [PATCH] x86_64: cleanup setup_node_zones called by paging_init v3 Yinghai Lu
2008-01-10 19:27         ` [PATCH] x86_64: cleanup setup_node_zones called by paging_init v4 Yinghai Lu
2008-01-12 11:26       ` [PATCH] x86_64: cleanup setup_node_zones called by paging_init v2 Yinghai Lu
2008-01-14 19:48         ` Christoph Lameter
2008-01-18 22:48           ` [PATCH] x86_64: only support sparsemem fix Yinghai Lu

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=1199905900.9834.96.camel@localhost \
    --to=haveblue@us.ibm.com \
    --cc=Yinghai.Lu@Sun.COM \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.