bug: split BUILD_BUG stuff out into <linux/build_bug.h>
authorIan Abbott <[email protected]>
Mon, 10 Jul 2017 22:51:07 +0000 (15:51 -0700)
committerLinus Torvalds <[email protected]>
Mon, 10 Jul 2017 23:32:34 +0000 (16:32 -0700)
commitbc6245e5efd70c41eaf9334b1b5e646745cb0fb3
tree534daeb120d3a1d716136eb32e0ce97bc69ff335
parent47e81e59d98b90727a02ceb486407eeed5eb8727
bug: split BUILD_BUG stuff out into <linux/build_bug.h>

Including <linux/bug.h> pulls in a lot of bloat from <asm/bug.h> and
<asm-generic/bug.h> that is not needed to call the BUILD_BUG() family of
macros.  Split them out into their own header, <linux/build_bug.h>.

Also correct some checkpatch.pl errors for the BUILD_BUG_ON_ZERO() and
BUILD_BUG_ON_NULL() macros by adding parentheses around the bitfield
widths that begin with a minus sign.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ian Abbott <[email protected]>
Acked-by: Michal Nazarewicz <[email protected]>
Acked-by: Kees Cook <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/bug.h
include/linux/build_bug.h [new file with mode: 0644]