Messages in this thread | | | Subject | RE: [Pv-drivers] [PATCH] include/log2.h: Fix rounddown_pow_of_two(1) | From | Peter Zijlstra <> | Date | Tue, 13 Dec 2011 21:07:12 +0100 |
| |
On Tue, 2011-12-13 at 12:06 -0800, Bhavesh Davda wrote: > > 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? > > Eh? The answer should be the power-of-two (1), not the exponent (0).
Yeah, just noticed that, see my other reply.
| |