Re: Re: [PATCH v7 2/2] lib: bitmap: optimize bitmap_find_next_zero_area_off()
From: Yury Norov
Date: Sat Jul 04 2026 - 18:03:52 EST
> This issue was caused by the return value of the function bitmap_find_next_zero_area.
> Previously, the return value could be greater than size; now it has been modified to be equal to size.
>
>
> int msi_bitmap_alloc_hwirqs(struct msi_bitmap *bmp, int num)
> {
> offset = bitmap_find_next_zero_area(bmp->bitmap, bmp->irq_count, 0, num, (1 << order) - 1);
> if (offset > bmp->irq_count)
> goto err;
>
>
> So, what should we do next?
> Should we make bitmap_find_next_zero_area_off return "size + 1" instead, all for the sake of compatibility?
> Or should we modify all the places that call bitmap_find_next_zero_area_off (which might be a big project)?
>
Please resend v7 version returning 'size+1'. The next step would be
fixing the function to return size, together with the callers. It
should be the separate series. Please let me know if you want to take
over.
Thanks,
Yury