Re: [PATCH v4] coding-style: Clarify the expectations around bool

2019-01-14 Thread Jason Gunthorpe
On Sun, Jan 13, 2019 at 05:01:39PM +0100, Federico Vaga wrote: > > -17) Don't re-invent the kernel macros > > +17) Using bool > > +-- > > + > > +The Linux kernel bool type is an alias for the C99 _Bool type. bool > > values can > > +only evaluate to 0 or 1, and implicit or explicit

Re: [PATCH v4] coding-style: Clarify the expectations around bool

2019-01-14 Thread Jason Gunthorpe
On Sun, Jan 13, 2019 at 08:49:36AM -0800, Matthew Wilcox wrote: > On Thu, Jan 10, 2019 at 11:48:13PM +, Jason Gunthorpe wrote: > > +The Linux kernel bool type is an alias for the C99 _Bool type. bool values > > can > > +only evaluate to 0 or 1, and implicit or explicit conversion to bool > >

Re: [PATCH v4] coding-style: Clarify the expectations around bool

2019-01-14 Thread Jason Gunthorpe
On Fri, Jan 11, 2019 at 07:29:40AM -1000, Joey Pabalinas wrote: > On Thu, Jan 10, 2019 at 11:48:13PM +, Jason Gunthorpe wrote: > > There has been some confusion since checkpatch started warning about bool > > use in structures, and people have been avoiding using it. > > > > Many people feel

Re: [PATCH v4] coding-style: Clarify the expectations around bool

2019-01-13 Thread Matthew Wilcox
On Thu, Jan 10, 2019 at 11:48:13PM +, Jason Gunthorpe wrote: > +The Linux kernel bool type is an alias for the C99 _Bool type. bool values > can > +only evaluate to 0 or 1, and implicit or explicit conversion to bool > +automatically converts the value to true or false. When using bool types

Re: [PATCH v4] coding-style: Clarify the expectations around bool

2019-01-13 Thread Federico Vaga
On 2019-01-11 00:48, Jason Gunthorpe wrote: There has been some confusion since checkpatch started warning about bool use in structures, and people have been avoiding using it. Many people feel there is still a legitimate place for bool in structures, so provide some guidance on bool usage

Re: [PATCH v4] coding-style: Clarify the expectations around bool

2019-01-11 Thread Joey Pabalinas
On Thu, Jan 10, 2019 at 11:48:13PM +, Jason Gunthorpe wrote: > There has been some confusion since checkpatch started warning about bool > use in structures, and people have been avoiding using it. > > Many people feel there is still a legitimate place for bool in structures, > so provide

[PATCH v4] coding-style: Clarify the expectations around bool

2019-01-10 Thread Jason Gunthorpe
There has been some confusion since checkpatch started warning about bool use in structures, and people have been avoiding using it. Many people feel there is still a legitimate place for bool in structures, so provide some guidance on bool usage derived from the entire thread that spawned the