Re: [PATCH 2/2] [condingstyle] Add chapter on tests

2007-05-27 Thread Pekka Enberg
On 5/27/07, Kok, Auke <[EMAIL PROTECTED]> wrote: that piece is a copy of mm/slab.c, and all over the core components of the kernel (even fs/inode.c written by Linus). I strongly think that "== NULL" doesn't add anything and that well-written functions and well-named variables really do not need

Re: [PATCH 2/2] [condingstyle] Add chapter on tests

2007-05-27 Thread Kok, Auke
Jan Engelhardt wrote: On May 25 2007 10:25, Auke Kok wrote: diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index f518395..3635b38 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle @@ -393,7 +393,7 @@ int fun(int a) int result = 0; char

Re: [PATCH 2/2] [condingstyle] Add chapter on tests

2007-05-27 Thread Jesper Juhl
On 25/05/07, Auke Kok <[EMAIL PROTECTED]> wrote: Several standards have been established on how to format tests and use NULL/false/true tests. Hmm, this may or may not be a good idea for CodingStyle, I'll leave that up to others. But, if you are going to renumber chapters then please also fix

Re: [PATCH 2/2] [condingstyle] Add chapter on tests

2007-05-27 Thread Jesper Juhl
On 25/05/07, Auke Kok [EMAIL PROTECTED] wrote: Several standards have been established on how to format tests and use NULL/false/true tests. Hmm, this may or may not be a good idea for CodingStyle, I'll leave that up to others. But, if you are going to renumber chapters then please also fix up

Re: [PATCH 2/2] [condingstyle] Add chapter on tests

2007-05-27 Thread Kok, Auke
Jan Engelhardt wrote: On May 25 2007 10:25, Auke Kok wrote: diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index f518395..3635b38 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle @@ -393,7 +393,7 @@ int fun(int a) int result = 0; char

Re: [PATCH 2/2] [condingstyle] Add chapter on tests

2007-05-27 Thread Pekka Enberg
On 5/27/07, Kok, Auke [EMAIL PROTECTED] wrote: that piece is a copy of mm/slab.c, and all over the core components of the kernel (even fs/inode.c written by Linus). I strongly think that == NULL doesn't add anything and that well-written functions and well-named variables really do not need the

Re: [PATCH 2/2] [condingstyle] Add chapter on tests

2007-05-26 Thread Jan Engelhardt
On May 25 2007 10:25, Auke Kok wrote: >diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle >index f518395..3635b38 100644 >--- a/Documentation/CodingStyle >+++ b/Documentation/CodingStyle >@@ -393,7 +393,7 @@ int fun(int a) > int result = 0; > char *buffer =

Re: [PATCH 2/2] [condingstyle] Add chapter on tests

2007-05-26 Thread Jan Engelhardt
On May 25 2007 10:25, Auke Kok wrote: diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index f518395..3635b38 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle @@ -393,7 +393,7 @@ int fun(int a) int result = 0; char *buffer = kmalloc(SIZE); -

Re: [PATCH 2/2] [condingstyle] Add chapter on tests

2007-05-25 Thread Kok, Auke
Stefan Richter wrote: Auke Kok wrote: +If you give your variables and pointers good names, there is never a need +to compare the value stored in that variable to NULL or true/false, so +omit all that and keep it short. I agree with this in principle. But do we have to standardize it? yes,

Re: [PATCH 2/2] [condingstyle] Add chapter on tests

2007-05-25 Thread Stefan Richter
Auke Kok wrote: > +If you give your variables and pointers good names, there is never a need > +to compare the value stored in that variable to NULL or true/false, so > +omit all that and keep it short. I agree with this in principle. But do we have to standardize it? -- Stefan Richter

[PATCH 2/2] [condingstyle] Add chapter on tests

2007-05-25 Thread Auke Kok
Several standards have been established on how to format tests and use NULL/false/true tests. Signed-off-by: Auke Kok <[EMAIL PROTECTED]> --- Documentation/CodingStyle | 51 +++-- 1 files changed, 40 insertions(+), 11 deletions(-) diff --git

[PATCH 2/2] [condingstyle] Add chapter on tests

2007-05-25 Thread Auke Kok
Several standards have been established on how to format tests and use NULL/false/true tests. Signed-off-by: Auke Kok [EMAIL PROTECTED] --- Documentation/CodingStyle | 51 +++-- 1 files changed, 40 insertions(+), 11 deletions(-) diff --git

Re: [PATCH 2/2] [condingstyle] Add chapter on tests

2007-05-25 Thread Kok, Auke
Stefan Richter wrote: Auke Kok wrote: +If you give your variables and pointers good names, there is never a need +to compare the value stored in that variable to NULL or true/false, so +omit all that and keep it short. I agree with this in principle. But do we have to standardize it? yes,

Re: [PATCH 2/2] [condingstyle] Add chapter on tests

2007-05-25 Thread Stefan Richter
Auke Kok wrote: +If you give your variables and pointers good names, there is never a need +to compare the value stored in that variable to NULL or true/false, so +omit all that and keep it short. I agree with this in principle. But do we have to standardize it? -- Stefan Richter