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  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]
Date:	Mon, 10 Nov 2014 15:36:47 -0800
From:	Andrew Morton <>
To:	Joe Perches <>
Cc:	David Miller <>,,, LKML <>
Subject: Re: [PATCH] checkpatch: Add --strict preference for #defines using

On Fri, 07 Nov 2014 13:15:39 -0800 Joe Perches <> wrote:

> Using BIT(foo) and BIT_ULL(bar) is more common now.
> Suggest using these macros over #defines with 1<<value.

urgh.  I'm counting eightish implementations of BIT(), an unknown
number of which are actually being used.  Many use 1<<n, some use
1UL<<N, another uses 1ULL<<n.  I'm a bit reluctant to recommend that
anyone should use BIT() until it has has some vigorous scrubbing :(

Is it actually an improvement?  If I see

#define X	(1U << 7)

then I know exactly what it does.  Whereas when I see

#define X	BIT(7)

I know neither the size or the signedness of X so I have to go look it

I have no strong feelings either way, but I'm wondering what might have
inspired this change?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists