Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH] Fix get_order() | Date | Tue, 06 Mar 2007 18:51:13 +0000 |
| |
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> That seems bogus. "n == 1" should give "0", no?
Sigh. No. The comment header says it all:
/** * roundup_pow_of_two - round the given value up to nearest power of two * @n - parameter * * round the given value up to the nearest power of two * - the result is undefined when n == 0 * - this can be used to initialise global variables from constant data */
Ie: round, say, 30 up to 32, not 5.
David - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |