From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Chanho Min <chanho.min@lge.com>,
Nadia Yvette Chambers <nyc@holomorphy.com>,
Jiri Kosina <jkosina@suse.cz>, Guennadi Liakhovetski <lg@denx.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bitmap: speedup in bitmap_find_free_region when order is 0
Date: Mon, 08 Apr 2013 14:35:22 -0700 [thread overview]
Message-ID: <1365456922.2029.18.camel@joe-AO722> (raw)
In-Reply-To: <20130408143037.5fe18306172315fc040329de@linux-foundation.org>
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
prev parent reply other threads:[~2013-04-08 21:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-08 2:23 Chanho Min
2013-04-08 21:30 ` Andrew Morton
2013-04-08 21:35 ` Joe Perches [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1365456922.2029.18.camel@joe-AO722 \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=chanho.min@lge.com \
--cc=jkosina@suse.cz \
--cc=lg@denx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nyc@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®