X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-mips%2Fbitops.h;h=642724734eba3e2dee33fe01cdd7fb12e8648aa9;hb=ac9d463afb1ca2434335351f3b7d9e4c8f8470e9;hp=ec75ce4cdb8c3e90307e51350c2d7dc4b950a4d5;hpb=0b776eb5426752d4e53354ac89e3710d857e09a7;p=linux-2.6 diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index ec75ce4cdb..642724734e 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h @@ -558,11 +558,13 @@ static inline void __clear_bit_unlock(unsigned long nr, volatile unsigned long * __clear_bit(nr, addr); } +#if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) + /* * 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; @@ -591,8 +593,6 @@ static inline int __ilog2(unsigned long x) return 63 - lz; } -#if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) - /* * __ffs - find first bit in word. * @word: The word to search @@ -602,7 +602,7 @@ static inline int __ilog2(unsigned long x) */ static inline unsigned long __ffs(unsigned long word) { - return __ilog2(word & -word); + return __fls(word & -word); } /* @@ -649,6 +649,7 @@ static inline int ffs(int word) #else #include +#include #include #include #include