Re: [PATCH 1/6] bitmap: fix opencoded bitmap_allocate_region()
From: Andy Shevchenko
Date: Thu Jul 27 2023 - 06:04:16 EST
On Wed, Jul 26, 2023 at 07:02:02PM -0700, Yury Norov wrote:
> bitmap_find_region() opencodes bitmap_allocate_region(). Fix it.
...
> + for (pos = 0 ; (end = pos + (1U << order)) <= bits; pos = end)
In the other patch you use BIT(order), why not here?
> + if (!bitmap_allocate_region(bitmap, pos, order))
> + return pos;
--
With Best Regards,
Andy Shevchenko