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

2007-05-27 Thread Guennadi Liakhovetski
On Sat, 26 May 2007, Jan Engelhardt wrote: > +Testing for a flag, as done in the following example, is redundant and > +can be shortened. > + > + if ((v & GFP_KERNEL) == GFP_KERNEL) > + return; > + > +should become > + > + if (v & GFP_KERNEL) > + return; This looks

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

2007-05-27 Thread Jan Engelhardt
On May 27 2007 17:23, Stefan Richter wrote: >Jan Engelhardt wrote: >> if (!p) /* Everytime you shorten it, God kills a kitten */ > >Very bad news for felines, judging from current coding practice. Don't worry. There are far worse codingstyles around, like the GNU 'standard'. (Indent

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

2007-05-27 Thread Stefan Richter
Jan Engelhardt wrote: > if (!p) /* Everytime you shorten it, God kills a kitten */ Very bad news for felines, judging from current coding practice. -- Stefan Richter -=-=-=== -=-= ==-== http://arcgraph.de/sr/ - To unsubscribe from this list: send the line "unsubscribe linux-kern

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

2007-05-27 Thread Jan Engelhardt
On May 27 2007 16:37, Stefan Richter wrote: >Jan Engelhardt wrote: >> +if (is_prime(number) == true) >> +return 0; >> +if (is_prime(number) == false) >> +return 1; >> + >> +should be: >> + >> +if (is_prime(number)) >> +return 0; >> +if (!is_prime

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

2007-05-27 Thread Stefan Richter
Jan Engelhardt wrote: > + if (is_prime(number) == true) > + return 0; > + if (is_prime(number) == false) > + return 1; > + > +should be: > + > + if (is_prime(number)) > + return 0; > + if (!is_prime(number)) > + return 1; > + > +As far

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

2007-05-26 Thread Scott Preece
On 5/26/07, Jan Engelhardt <[EMAIL PROTECTED]> wrote: Based in part on Auke's patch. Signed-off-by: Jan Engelhardt <[EMAIL PROTECTED]> --- Documentation/CodingStyle | 74 +++--- 1 file changed, 64 insertions(+), 10 deletions(-) Index: linux-2.6.22-rc

[PATCH] [condingstyle] Add chapter on tests

2007-05-26 Thread Jan Engelhardt
Based in part on Auke's patch. Signed-off-by: Jan Engelhardt <[EMAIL PROTECTED]> --- Documentation/CodingStyle | 74 +++--- 1 file changed, 64 insertions(+), 10 deletions(-) Index: linux-2.6.22-rc3/Documentation/CodingStyle