Re: [PATCH] Fix get_order() [try #2]

From: David Howells
Date: Tue Mar 06 2007 - 13:43:26 EST


H. Peter Anvin <hpa@xxxxxxxxx> wrote:

> Eh? roundup_pow_of_two(1) should be 0; 2^0 = 1.

Nonono.

roundup_pow_of_two(0) => ?
roundup_pow_of_two(1) => 1
roundup_pow_of_two(2) => 2
roundup_pow_of_two(3) => 4
roundup_pow_of_two(4) => 4
roundup_pow_of_two(5) => 8
roundup_pow_of_two(6) => 8
roundup_pow_of_two(7) => 8
roundup_pow_of_two(8) => 8
roundup_pow_of_two(9) => 16
roundup_pow_of_two(10) => 16
roundup_pow_of_two(11) => 16
...

David
-
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/