Add a "rounddown_pow_of_two" routine to log2.h
authorRobert P. J. Day <rpjday@mindspring.com>
Wed, 17 Oct 2007 06:29:32 +0000 (23:29 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:56 +0000 (08:42 -0700)
commitb311e921b385b5a848f0806df16276aca1ecae07
tree957947e319b23150ddbbf7db52f9bdd24b6cdba5
parentd9aacccf457d07d729cfc7bf20ff0c7428357a9f
Add a "rounddown_pow_of_two" routine to log2.h

To go along with the existing "roundup_pow_of_two" routine, add one for
rounding down since that operation appears to crop up on a regular basis in
the source tree.

[m.kozlowski@tuxland.pl: fix unbalanced parentheses]
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/log2.h