mm-vmalloc-fix-align-value-calculation-error-v2-fix
authorAndrew Morton <akpm@linux-foundation.org>
Sat, 10 Sep 2016 10:34:03 +0000 (20:34 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Sat, 10 Sep 2016 10:34:03 +0000 (20:34 +1000)
locate get_count_order_long() next to get_count_order()

Cc: zijun_hu <zijun_hu@htc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/bitops.h

index 93a07d1827c619a4457493d8f672a5c8cf7601c6..b11c480041efb7f7fc0130eb604d99e99b7de5f0 100644 (file)
@@ -75,6 +75,22 @@ static inline int get_count_order(unsigned int count)
        return order;
 }
 
+/**
+ * get_count_order_long - get order after rounding @l up to power of 2
+ * @l: parameter
+ *
+ * it is same as get_count_order() but with long type parameter
+ */
+static inline int get_count_order_long(unsigned long l)
+{
+       if (l == 0UL)
+               return -1;
+       else if (l & (l - 1UL))
+               return (int)fls_long(l);
+       else
+               return (int)fls_long(l) - 1;
+}
+
 static __always_inline unsigned long hweight_long(unsigned long w)
 {
        return sizeof(w) == 4 ? hweight32(w) : hweight64(w);
@@ -191,22 +207,6 @@ static inline unsigned fls_long(unsigned long l)
        return fls64(l);
 }
 
-/**
- * get_count_order_long - get order after rounding @l up to power of 2
- * @l: parameter
- *
- * it is same as get_count_order() but with long type parameter
- */
-static inline int get_count_order_long(unsigned long l)
-{
-       if (l == 0UL)
-               return -1;
-       else if (l & (l - 1UL))
-               return (int)fls_long(l);
-       else
-               return (int)fls_long(l) - 1;
-}
-
 /**
  * __ffs64 - find first set bit in a 64 bit word
  * @word: The 64 bit word
This page took 0.025753 seconds and 5 git commands to generate.