Re: [PATCH 5/7] Alter get_order() so that it can make use ofilog2() on a constant [try #3]

From: Stephen Rothwell
Date: Sun Sep 17 2006 - 06:04:59 EST


On Fri, 15 Sep 2006 15:42:42 +0100 David Howells <dhowells@xxxxxxxxxx> wrote:
>
> Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>
> > Except the get_order() interface is purely related to pages (the fact
> > that you have reimplemented it using the log2-based functions is just an
> > implementation detail.
>
> Do you have a major objection to it moving to linux/log2.h (do you count the
> one you've just raised as "major")?

I just think that things should be grouped according to the function they
provide (and not their implemetation) and get_order is part of the paging
API.

> I'd rather avoid including linux/log2.h or linux/kernel.h in asm/page.h, plus
> asm-generic/page.h isn't used by all archs (though that's a minor point).

You only have to include linux/log2.h in asm-generic/page.h. Presumably
the architectures that don't use asm-generic/page.h won't want the new
implementation of get_order() either (I didn't keep the original patch).

Won't you need to include linux/log2.h in some places to get get_order(),
now? And if I was needing the paging API, I am much more likely to look
for it in {linux,asm}/page.h than in linux/log2.h.

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/