Re: [PATCH] include/log2.h: Fix rounddown_pow_of_two(1)

From: Peter Zijlstra
Date: Tue Dec 13 2011 - 15:01:27 EST


On Mon, 2011-12-12 at 10:02 -0800, Dmitry Torokhov wrote:
> 1 is a power of two, therefore rounddown_pow_of_two(1) should return 1.

x^0 = 1
x^1 = x

Seems to me 0 was the right answer, no?


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