On Thu, May 25 2017, Ian Abbott wrote: > 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. > > Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx> > Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> > Cc: Kees Cook <keescook@xxxxxxxxxxxx> > Cc: Steven Rostedt <rostedt@xxxxxxxxxxx> > Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> > Cc: Jakub Kicinski <jakub.kicinski@xxxxxxxxxxxxx> > Cc: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> To be honest though, I would squash the fixes with the rename. > --- > v5: Actually, there was no v1 thru v4. I called this v5 to match the > series. > --- > include/linux/bug.h | 4 ++-- > 1 file 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; > * e.g. in a structure initializer (or where-ever else comma expressions > * aren't permitted). > */ > -#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) > -#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) > +#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); })) > +#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:(-!!(e)); })) > > /* > * BUILD_BUG_ON_INVALID() permits the compiler to check the validity of the -- Best regards ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ «If at first you don’t succeed, give up skydiving»