Messages in this thread | | | Subject | Re: [PATCH] x86_64: cleanup setup_node_zones called by paging_init v2 | From | Dave Hansen <> | Date | Wed, 09 Jan 2008 11:11:40 -0800 |
| |
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
| |