Skip to content

Commit eae5acb

Browse files
committed
bitmap: replace _reg_op(REG_OP_ALLOC) with bitmap_set()
_reg_op(REG_OP_ALLOC) duplicates bitmap_set(). CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com> CC: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Yury Norov <yury.norov@gmail.com>
1 parent b085f96 commit eae5acb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/bitmap.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,9 +838,12 @@ EXPORT_SYMBOL(bitmap_release_region);
838838
*/
839839
int bitmap_allocate_region(unsigned long *bitmap, unsigned int pos, int order)
840840
{
841+
unsigned int len = BIT(order);
842+
841843
if (!__reg_op(bitmap, pos, order, REG_OP_ISFREE))
842844
return -EBUSY;
843-
return __reg_op(bitmap, pos, order, REG_OP_ALLOC);
845+
bitmap_set(bitmap, pos, len);
846+
return 0;
844847
}
845848
EXPORT_SYMBOL(bitmap_allocate_region);
846849

0 commit comments

Comments
 (0)