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] [thread-next>] [day] [month] [year] [list]
Message-ID: <e2e108261001062333p2a626bf6h4b25de0ac919ef1d@mail.gmail.com>
Date:	Thu, 7 Jan 2010 08:33:21 +0100
From:	Bart Van Assche <bvanassche@....org>
To:	Roland Dreier <rdreier@...co.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, David Dillow <dave@...dillows.org>
Subject: Re: [PATCH] Add BUILD_BUG_ON_NOT_POWER_OF_2()

On Thu, Jan 7, 2010 at 12:02 AM, Roland Dreier <rdreier@...co.com> wrote:
> +/* Force a compilation error if expression is not a power of 2 */
> +#define BUILD_BUG_ON_NOT_POWER_OF_2(n)                 \
> +       BUILD_BUG_ON(((n) != 0 && (((n) & ((n) - 1)) == 0)))

Hello Roland,

Can you please change the above into the following, such that the
macro does what its name suggests:

#define BUILD_BUG_ON_NOT_POWER_OF_2(n)                 \
       BUILD_BUG_ON(((n) == 0 || (((n) & ((n) - 1)) != 0)))

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