lkml.org 
[lkml]   [2008]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86_64: cleanup setup_node_zones called by paging_init v2
From
Date
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



\
 
 \ /
  Last update: 2008-01-09 20:15    [W:0.381 / U:1.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site