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: <CAK=WgbZhhbjOyb0ktsSSsw2s6rw=NDDSJZ0G-84gRKw-J7gy=w@mail.gmail.com>
Date:	Mon, 7 Dec 2015 18:16:58 +0200
From:	Ohad Ben-Cohen <ohad@...ery.com>
To:	"zhaoxiu.zeng" <zhaoxiu.zeng@...il.com>
Cc:	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 04/10] omap_hwspinlock: Replace "hweight_long(i & 0xf) !=
 1" with "!is_power_of_2(i & 0xf)"

On Mon, Dec 7, 2015 at 5:03 PM, zhaoxiu.zeng <zhaoxiu.zeng@...il.com> wrote:
> is_power_of_2 is simple, and faster than "hweightN(x) == 1" on most architectures.

Thanks. I'm not sure that speed is a major concern here, since this
code executes only once during the lifetime of the driver. Readability
is probably more important.
--
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