lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1365456922.2029.18.camel@joe-AO722>
Date:	Mon, 08 Apr 2013 14:35:22 -0700
From:	Joe Perches <joe@...ches.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Chanho Min <chanho.min@....com>,
	Nadia Yvette Chambers <nyc@...omorphy.com>,
	Jiri Kosina <jkosina@...e.cz>,
	Guennadi Liakhovetski <lg@...x.de>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bitmap: speedup in bitmap_find_free_region when order
 is 0

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@....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


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ