]> err.no Git - linux-2.6/blobdiff - include/asm-v850/bitops.h
[PATCH] USB: add support for OCHI on AT91rm9200
[linux-2.6] / include / asm-v850 / bitops.h
index 0e5c2f210872b75165f4d622d63b2656352ec40f..609b9e87222a41c3594014e4f585d6a88333af79 100644 (file)
@@ -30,7 +30,7 @@
  * ffz = Find First Zero in word. Undefined if no zero exists,
  * so code should check against ~0UL first..
  */
-extern __inline__ unsigned long ffz (unsigned long word)
+static inline unsigned long ffz (unsigned long word)
 {
        unsigned long result = 0;
 
@@ -135,7 +135,7 @@ extern __inline__ unsigned long ffz (unsigned long word)
                             "m" (*((const char *)(addr) + ((nr) >> 3))));    \
      __test_bit_res;                                                         \
   })
-extern __inline__ int __test_bit (int nr, const void *addr)
+static inline int __test_bit (int nr, const void *addr)
 {
        int res;
        __asm__ __volatile__ ("tst1 %1, [%2]; setf nz, %0"
@@ -157,7 +157,7 @@ extern __inline__ int __test_bit (int nr, const void *addr)
 #define find_first_zero_bit(addr, size) \
   find_next_zero_bit ((addr), (size), 0)
 
-extern __inline__ int find_next_zero_bit(const void *addr, int size, int offset)
+static inline int find_next_zero_bit(const void *addr, int size, int offset)
 {
        unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
        unsigned long result = offset & ~31UL;
@@ -188,7 +188,7 @@ extern __inline__ int find_next_zero_bit(const void *addr, int size, int offset)
        tmp = *p;
 
  found_first:
-       tmp |= ~0UL >> size;
+       tmp |= ~0UL << size;
  found_middle:
        return result + ffz (tmp);
 }
@@ -276,6 +276,7 @@ found_middle:
 
 #define ffs(x) generic_ffs (x)
 #define fls(x) generic_fls (x)
+#define fls64(x) generic_fls64(x)
 #define __ffs(x) ffs(x)