From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966158AbdEYOCz (ORCPT ); Thu, 25 May 2017 10:02:55 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:36084 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761535AbdEYOCw (ORCPT ); Thu, 25 May 2017 10:02:52 -0400 From: Michal Nazarewicz To: Ian Abbott , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: Alexander Potapenko , Andrew Morton , Arnd Bergmann , Borislav Petkov , Hidehiro Kawai , Ian Abbott , Jakub Kicinski , Johannes Berg , Kees Cook , Peter Zijlstra , Rasmus Villemoes , Steven Rostedt Subject: Re: [PATCH v5 4/6] linux/bug.h: correct "space required before that '-'" In-Reply-To: <20170525120316.24473-5-abbotti@mev.co.uk> Organization: http://mina86.com/ References: <20170525120316.24473-1-abbotti@mev.co.uk> <20170525120316.24473-5-abbotti@mev.co.uk> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWbfGlUPDDHgE57V0jUupKjgIObY0PLrom9mH4dFRK4gmjPs41MxjOgAAACP0lEQVQ4T23Sv2vbQBQHcBk1xE6WyALX107VUEgmn6+ouUwpEQQ6uRjttkWP4CkBg2M0BQLBdPFZYPsyFYo7qEtKDQ7on+t7+nF2Ux8ahD587717OmNYrOvycHsZ+o2r051wHTHysAvGb8ygvgu4QWT0sCmkgZCIEnlV2X8BtyraazFGDuxhmKSQJMlwHQ7v5MHSNxmz78rfElwAa3ieVD9e+hBhjaPDDG6NgFo2f4wBMNIo5YmRtF0RyDgFjJjlMIWbnuM4x9MMfABGTlN4qgIQB4A1DEyA1BHWtfeWNUMwiVJKoqh97KrkOO+qzgluVYLvFCUKAX73nONeBr7BGMdM6Sg0kuep03VywLaIzRiVr+GAzKlpQIsAFnWAG2e6DT5WmWDiudZMIc6hYrMOmeMQK9WX0B+/RfjzL9DI7Y9/Iayn29Ci0r2i4f9gMimMSZLCDMalgQGU5hnUtqAN0OGvEmO1Wnl0C0wWSCEHnuHBqmygxdxA8oWXwbipoc1EoNR9DqOpBpOJrnr0criQab9ZT4LL+wI+K7GBQH30CrhUruilgP9DRTrhVWZCiAyILP+wiuLeCKGTD6r/nc8LOJcAwR6IBTUs+7CASw3QFZ0MdA2PI3zNziH4ZKVhXCRMBjeZ1DWMekKwDCASwExy+NQ86TaykaDAFHO4aP48y4fIcDM5yOG8GcTLbOyp8A8azjJI93JFd1EA6yN8sSxMQJWoABqniRZVykYgRXErzrdqExAoUrRb0xfRp8p2A/4XmfilTtkDZ4cAAAAASUVORK5CYII= X-Face: -TR8(rDTHy/(xl?SfWd1|3:TTgDIatE^t'vop%*gVg[kn$t{EpK(P"VQ=~T2#ysNmJKN$"yTRLB4YQs$4{[.]Fc1)*O]3+XO^oXM>Q#b^ix,O)Zbn)q[y06$`e3?C)`CwR9y5riE=fv^X@x$y?D:XO6L&x4f-}}I4=VRNwiA^t1-ZrVK^07.Pi/57c_du'& OpenPGP: id=AC1F5F5CD41888F8CC8458582060401250751FF4; url=http://mina86.com/mina86.pub X-Hashcash: 1:20:170525:rostedt@goodmis.org::jGmq4f74GJGqd5au:0000000000000000000000000000000000000000000U6U X-Hashcash: 1:20:170525:linux@rasmusvillemoes.dk::p1DeDGCv+xM8ImOH:00000000000000000000000000000000000000RhB X-Hashcash: 1:20:170525:johannes.berg@intel.com::+ErH+F7JsRDApUPv:0000000000000000000000000000000000000003/t X-Hashcash: 1:20:170525:jakub.kicinski@netronome.com::Bhw8RXUE0RHSszeM:0000000000000000000000000000000000cax X-Hashcash: 1:20:170525:hidehiro.kawai.ez@hitachi.com::a+Q8RM8tM+ZES20r:000000000000000000000000000000000HAZ X-Hashcash: 1:20:170525:bp@suse.de::qG8BrF3v69ZmXSDE:00000000ZyI X-Hashcash: 1:20:170525:glider@google.com::Cas8TXj//dkp8kV1:000000000000000000000000000000000000000000000RGt X-Hashcash: 1:20:170525:linux-kernel@vger.kernel.org::DUdTXUVs62bJCD69:0000000000000000000000000000000004C3/ X-Hashcash: 1:20:170525:arnd@arndb.de::WDpWUET64TXkpg/p:00003L2f X-Hashcash: 1:20:170525:linux-arch@vger.kernel.org::I6k/iU1ZIT6NtjKg:000000000000000000000000000000000003BU6 X-Hashcash: 1:20:170525:abbotti@mev.co.uk::ZbyJZif7NcqY/z1U:000000000000000000000000000000000000000000002r46 X-Hashcash: 1:20:170525:abbotti@mev.co.uk::LpPHqbnScqjaPdlC:000000000000000000000000000000000000000000004a/B X-Hashcash: 1:20:170525:peterz@infradead.org::bOPPF6j17BzU7JBL:00000000000000000000000000000000000000000512v X-Hashcash: 1:20:170525:akpm@linux-foundation.org::Snw2lnP2x+xe53py:0000000000000000000000000000000000005miT X-Hashcash: 1:20:170525:keescook@chromium.org::XirVM3nHR8AkWKr8:0000000000000000000000000000000000000000FV5r Date: Thu, 25 May 2017 16:02:46 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v4PE31cM013637 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 > Cc: Andrew Morton > Cc: Kees Cook > Cc: Steven Rostedt > Cc: Peter Zijlstra > Cc: Jakub Kicinski > Cc: Rasmus Villemoes 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» From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Nazarewicz Subject: Re: [PATCH v5 4/6] linux/bug.h: correct "space required before that '-'" Date: Thu, 25 May 2017 16:02:46 +0200 Message-ID: References: <20170525120316.24473-1-abbotti@mev.co.uk> <20170525120316.24473-5-abbotti@mev.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20170525120316.24473-5-abbotti@mev.co.uk> Sender: linux-kernel-owner@vger.kernel.org To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: Alexander Potapenko , Andrew Morton , Arnd Bergmann , Borislav Petkov , Hidehiro Kawai , Ian Abbott , Jakub Kicinski , Johannes Berg , Kees Cook , Peter Zijlstra , Rasmus Villemoes , Steven Rostedt List-Id: linux-arch.vger.kernel.org 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 > Cc: Andrew Morton > Cc: Kees Cook > Cc: Steven Rostedt > Cc: Peter Zijlstra > Cc: Jakub Kicinski > Cc: Rasmus Villemoes 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)); })) >=20=20 > /* > * BUILD_BUG_ON_INVALID() permits the compiler to check the validity of = the --=20 Best regards =E3=83=9F=E3=83=8F=E3=82=A6 =E2=80=9C=F0=9D=93=B6=F0=9D=93=B2=F0=9D=93=B7= =F0=9D=93=AA86=E2=80=9D =E3=83=8A=E3=82=B6=E3=83=AC=E3=83=B4=E3=82=A4=E3=83= =84 =C2=ABIf at first you don=E2=80=99t succeed, give up skydiving=C2=BB From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com ([74.125.82.49]:37068 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966014AbdEYOCz (ORCPT ); Thu, 25 May 2017 10:02:55 -0400 Received: by mail-wm0-f49.google.com with SMTP id d127so98919706wmf.0 for ; Thu, 25 May 2017 07:02:53 -0700 (PDT) From: Michal Nazarewicz Subject: Re: [PATCH v5 4/6] linux/bug.h: correct "space required before that '-'" In-Reply-To: <20170525120316.24473-5-abbotti@mev.co.uk> References: <20170525120316.24473-1-abbotti@mev.co.uk> <20170525120316.24473-5-abbotti@mev.co.uk> Date: Thu, 25 May 2017 16:02:46 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-arch-owner@vger.kernel.org List-ID: To: Ian Abbott , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: Alexander Potapenko , Andrew Morton , Arnd Bergmann , Borislav Petkov , Hidehiro Kawai , Jakub Kicinski , Johannes Berg , Kees Cook , Peter Zijlstra , Rasmus Villemoes , Steven Rostedt Message-ID: <20170525140246.KbdFDw7ca0sOMyIh5ipCBzAbz1tqjGQW_8-NHktXG6w@z> 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 > Cc: Andrew Morton > Cc: Kees Cook > Cc: Steven Rostedt > Cc: Peter Zijlstra > Cc: Jakub Kicinski > Cc: Rasmus Villemoes 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)); })) >=20=20 > /* > * BUILD_BUG_ON_INVALID() permits the compiler to check the validity of = the --=20 Best regards =E3=83=9F=E3=83=8F=E3=82=A6 =E2=80=9C=F0=9D=93=B6=F0=9D=93=B2=F0=9D=93=B7= =F0=9D=93=AA86=E2=80=9D =E3=83=8A=E3=82=B6=E3=83=AC=E3=83=B4=E3=82=A4=E3=83= =84 =C2=ABIf at first you don=E2=80=99t succeed, give up skydiving=C2=BB