[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45EDB4D2.5080702@zytor.com>
Date: Tue, 06 Mar 2007 10:37:06 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: David Howells <dhowells@...hat.com>
CC: torvalds@...l.org, akpm@...l.org, benh@...nel.crashing.org,
linux-kernel@...r.kernel.org, johannes@...solutions.net
Subject: Re: [PATCH] Fix get_order() [try #2]
David Howells wrote:
> From: David Howells <dhowells@...hat.com>
>
> Provide an ilog2_up() that rounds its result up (ilog2() rounds down).
>
> Fix get_order() to use ilog2_up() not ilog2() to get the correct rounding.
>
> Adjust the documentation surrounding ilog2() and co. to indicate what rounding
> they perform.
>
> Fix roundup_pow_of_two(1) to give 1, not 0.
Eh? roundup_pow_of_two(1) should be 0; 2^0 = 1.
-hpa
-
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