]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[MIPS] Get rid of __ilog2
authorRalf Baechle <ralf@linux-mips.org>
Sun, 4 May 2008 13:53:53 +0000 (14:53 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 12 May 2008 15:46:55 +0000 (16:46 +0100)
56a6b1eb7bfb5ace0b5cb9c149f502fbd101b8ab was a bit too conservative and
left __ilog2 around which is only used as an internal function for other
bitops.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
include/asm-mips/bitops.h

index 5e1f590a24a1f22fbce648e376c2e933020fa90b..642724734eba3e2dee33fe01cdd7fb12e8648aa9 100644 (file)
@@ -564,7 +564,7 @@ static inline void __clear_bit_unlock(unsigned long nr, volatile unsigned long *
  * Return the bit position (0..63) of the most significant 1 bit in a word
  * Returns -1 if no 1 bit exists
  */
-static inline int __ilog2(unsigned long x)
+static inline unsigned long __fls(unsigned long x)
 {
        int lz;
 
@@ -593,11 +593,6 @@ static inline int __ilog2(unsigned long x)
        return 63 - lz;
 }
 
-static inline unsigned long __fls(unsigned long x)
-{
-       return __ilog2(x);
-}
-
 /*
  * __ffs - find first bit in word.
  * @word: The word to search
@@ -607,7 +602,7 @@ static inline unsigned long __fls(unsigned long x)
  */
 static inline unsigned long __ffs(unsigned long word)
 {
-       return __ilog2(word & -word);
+       return __fls(word & -word);
 }
 
 /*