return order;
}
+/**
+ * get_count_order_long - get order after rounding @l up to power of 2
+ * @l: parameter
+ *
+ * The same as get_count_order() but accepts a long type parameter
+ * or 0 is returned if @l == 0UL
+ */
+static inline int get_count_order_long(unsigned long l)
+{
+ if (l == 0UL)
+ return 0;
+ else if (l & (l - 1UL))
+ return fls_long(l);
+ else
+ return fls_long(l) - 1;
+}
+
static __always_inline unsigned long hweight_long(unsigned long w)
{
return sizeof(w) == 4 ? hweight32(w) : hweight64(w);
return fls64(l);
}
-/**
- * get_order_long - get order after rounding @l up to power of 2
- * @l: parameter
- *
- * it is same as get_count_order() but long type parameter
- * or 0 is returned if @l == 0UL
- */
-static inline int get_order_long(unsigned long l)
-{
- if (l == 0UL)
- return 0;
- else if (l & (l - 1UL))
- return fls_long(l);
- else
- return fls_long(l) - 1;
-}
-
/**
* __ffs64 - find first set bit in a 64 bit word
* @word: The 64 bit word
BUG_ON(in_interrupt());
if (flags & VM_IOREMAP)
- align = 1ul << clamp_t(int, get_order_long(size),
+ align = 1ul << clamp_t(int, get_count_order_long(size),
PAGE_SHIFT, IOREMAP_MAX_ORDER);
size = PAGE_ALIGN(size);