Whamcloud - gitweb
LU-5396 libcfs: add sparse annotation __user wherever needed
[fs/lustre-release.git] / libcfs / include / libcfs / user-bitops.h
index 51aba34..1b16ca7 100644 (file)
@@ -26,6 +26,8 @@
 /*
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2012, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -74,7 +76,7 @@ static inline int test_bit(int nr, const unsigned long *addr)
 }
 
 /* using binary seach */
-static __inline__ unsigned long __cfs_fls(long data)
+static __inline__ unsigned long fls(long data)
 {
        int pos = 32;
 
@@ -145,8 +147,8 @@ static __inline__ unsigned long __cfs_ffs(long data)
         return pos;
 }
 
-#define __cfs_ffz(x)   __cfs_ffs(~(x))
-#define __cfs_flz(x)   __cfs_fls(~(x))
+#define ffz(x)         ffs(~(x))
+#define flz(x)         fls(~(x))
 
 unsigned long find_next_bit(unsigned long *addr,
                            unsigned long size, unsigned long offset);