rk: revert 20f3d0b+v3.0.66 to v3.0
[firefly-linux-kernel-4.4.55.git] / arch / tile / include / asm / bitops.h
index bd186c4eaa505947299f0a1d98de1dbe9b9102f6..16f1fa51fea13de4139c5a18c2d10088b8e395c1 100644 (file)
@@ -77,11 +77,6 @@ static inline int ffs(int x)
        return __builtin_ffs(x);
 }
 
-static inline int fls64(__u64 w)
-{
-       return (sizeof(__u64) * 8) - __builtin_clzll(w);
-}
-
 /**
  * fls - find last set bit in word
  * @x: the word to search
@@ -95,7 +90,12 @@ static inline int fls64(__u64 w)
  */
 static inline int fls(int x)
 {
-       return fls64((unsigned int) x);
+       return (sizeof(int) * 8) - __builtin_clz(x);
+}
+
+static inline int fls64(__u64 w)
+{
+       return (sizeof(__u64) * 8) - __builtin_clzll(w);
 }
 
 static inline unsigned int __arch_hweight32(unsigned int w)