[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1166483780.8648.26.camel@localhost.localdomain>
Date: Mon, 18 Dec 2006 15:16:20 -0800
From: Dave Hansen <haveblue@...ibm.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: linuxppc-dev@...abs.org,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Andrew Morton <akpm@...l.org>, kmannth@...ibm.com,
linux-kernel@...r.kernel.org, hch@...radead.org,
linux-mm@...ck.org, paulus@...ba.org, mkravetz@...ibm.com,
gone@...ibm.com, cbe-oss-dev@...abs.org
Subject: Re: [PATCH] Fix sparsemem on Cell
On Mon, 2006-12-18 at 23:54 +0100, Arnd Bergmann wrote:
> #ifndef __HAVE_ARCH_MEMMAP_INIT
> #define memmap_init(size, nid, zone, start_pfn) \
> - memmap_init_zone((size), (nid), (zone), (start_pfn))
> + memmap_init_zone((size), (nid), (zone), (start_pfn), 1)
> #endif
This is what I was thinking of. Sometimes I find these kinds of calls a
bit annoying:
foo(0, 1, 1, 0, 99, 22)
It only takes a minute to look up what all of the numbers do, but that
is one minute too many. :)
How about an enum, or a pair of #defines?
enum context
{
EARLY,
HOTPLUG
};
extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long,
enum call_context);
...
So, the call I quoted above would become:
memmap_init_zone((size), (nid), (zone), (start_pfn), EARLY)
-- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists