Messages in this thread | | | Subject | Re: [PATCH] bitmap: speedup in bitmap_find_free_region when order is 0 | From | Joe Perches <> | Date | Mon, 08 Apr 2013 14:35:22 -0700 |
| |
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@lge.com> 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
| |