Re: [PATCH] bitmap: speedup in bitmap_find_free_region when orderis 0

From: Joe Perches
Date: Mon Apr 08 2013 - 17:35:26 EST


On Mon, 2013-04-08 at 14:30 -0700, Andrew Morton wrote:
> On Mon, 8 Apr 2013 11:23:48 +0900 Chanho Min <chanho.min@xxxxxxx> wrote:
> > --- a/lib/bitmap.c
[]
> > +static int __bitmap_find_free_one(unsigned long *bitmap, int bits)
[]
> > + unsigned long mask = (unsigned long)(~((unsigned long) 0));
>
> That seems unnecessarily complicated. "unsigned long mask = -1;" works :)

So would ULONG_MAX or just ~0UL


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/