> +static unsigned long find_aligned_range(unsigned long *bitmap, > + u32 start, u32 nbits, > + int len, int align) Seems that a lot of this code can be replaced by a call to bitmap_find_free_region()? - R.