diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2017-07-10 18:51:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-10 19:32:34 -0400 |
commit | 47e81e59d98b90727a02ceb486407eeed5eb8727 (patch) | |
tree | d43a183b232918a31c541a7ec468b40d119a86fe | |
parent | 8cdd7cca9287abf4c849c01e2a4e8207ad3e3a82 (diff) |
linux/bug.h: correct "space required before that '-'"
Correct these checkpatch.pl errors:
|ERROR: space required before that '-' (ctx:OxO)
|#37: FILE: include/linux/bug.h:37:
|+#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
|ERROR: space required before that '-' (ctx:OxO)
|#38: FILE: include/linux/bug.h:38:
|+#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); }))
I decided to wrap the bitfield expressions that begin with minus signs
in parentheses rather than insert spaces before the minus signs.
Link: http://lkml.kernel.org/r/20170525120316.24473-5-abbotti@mev.co.uk
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/bug.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/bug.h b/include/linux/bug.h index 216a1b79653d..483207cb99fb 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h | |||
@@ -36,8 +36,8 @@ struct pt_regs; | |||
36 | * e.g. in a structure initializer (or where-ever else comma expressions | 36 | * e.g. in a structure initializer (or where-ever else comma expressions |
37 | * aren't permitted). | 37 | * aren't permitted). |
38 | */ | 38 | */ |
39 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) | 39 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); })) |
40 | #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) | 40 | #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:(-!!(e)); })) |
41 | 41 | ||
42 | /* | 42 | /* |
43 | * BUILD_BUG_ON_INVALID() permits the compiler to check the validity of the | 43 | * BUILD_BUG_ON_INVALID() permits the compiler to check the validity of the |