Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread Joe Perches
On Mon, 2012-07-09 at 19:21 -0700, David Rientjes wrote: > On Mon, 9 Jul 2012, Joe Perches wrote: > > > I don't really care what style a large block of code > > uses. I care that it mostly has the same form. > Same form?? The sizeof operator has two forms depending on whether it's a > unary

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread David Rientjes
On Mon, 9 Jul 2012, Linus Torvalds wrote: > sizeof without parenthesis is an abomination, and should never be used. > > Sure, you don't need to have the parenthesis (except when you do - for > actual types), but it's a parsing oddity. > > The sane solution is: just add the f*cking parenthesis,

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread Linus Torvalds
On Mon, Jul 9, 2012 at 6:50 PM, David Rientjes wrote: > > This doesn't suggest parenthesis for sizeof at all times sizeof without parenthesis is an abomination, and should never be used. Sure, you don't need to have the parenthesis (except when you do - for actual types), but it's a parsing

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread David Rientjes
On Mon, 9 Jul 2012, Joe Perches wrote: > I don't really care what style a large block of code > uses. I care that it mostly has the same form. > Same form?? The sizeof operator has two forms depending on whether it's a unary expression or a type as specified by the standard. The issue here

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread Joe Perches
On Mon, 2012-07-09 at 18:50 -0700, David Rientjes wrote: > On Mon, 9 Jul 2012, Joe Perches wrote: > > > CodingStyle already does suggest parenthesis around sizeof > > > > 3.1: Spaces > > > > Linux kernel style for use of spaces depends (mostly) on > > function-versus-keyword usage. Use a

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread David Rientjes
On Mon, 9 Jul 2012, Joe Perches wrote: > CodingStyle already does suggest parenthesis around sizeof > > 3.1: Spaces > > Linux kernel style for use of spaces depends (mostly) on > function-versus-keyword usage. Use a space after (most) keywords. The > notable exceptions are sizeof, typeof,

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread Joe Perches
On Mon, 2012-07-09 at 16:47 -0700, David Rientjes wrote: > On Mon, 9 Jul 2012, Joe Perches wrote: > > > > So, nack, don't start enforcing your own coding style and preferences in > > > checkpatch.pl. > > > > Not just my opinion. > > > > https://lkml.org/lkml/2008/12/23/138 > >

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread David Rientjes
On Mon, 9 Jul 2012, Joe Perches wrote: > > So, nack, don't start enforcing your own coding style and preferences in > > checkpatch.pl. > > Not just my opinion. > > https://lkml.org/lkml/2008/12/23/138 > > Date: Tue, 23 Dec 2008 10:08:50

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread Joe Perches
On Mon, 2012-07-09 at 15:55 -0700, David Rientjes wrote: > So, nack, don't start enforcing your own coding style and preferences in > checkpatch.pl. Not just my opinion. https://lkml.org/lkml/2008/12/23/138 Date: Tue, 23 Dec 2008 10:08:50

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread David Rientjes
On Mon, 9 Jul 2012, Joe Perches wrote: > Huh? Maybe I misunderstand you. > > $ cat sizeof.c > #include > #include > #include > > struct foo { > int bar[20]; > char *baz; > }; > > int main(int argc, char **argv) > { > struct foo bar; > struct foo *baz; > >

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread Joe Perches
On Mon, 2012-07-09 at 15:23 -0700, David Rientjes wrote: > On Mon, 9 Jul 2012, a...@linux-foundation.org wrote: > > > From: Joe Perches > > Subject: checkpatch: Add acheck for use of sizeof without parenthesis > > > > Kernel style uses parenthesis around sizeof. > > > > Nack, there's a

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread David Rientjes
On Mon, 9 Jul 2012, a...@linux-foundation.org wrote: > From: Joe Perches > Subject: checkpatch: Add acheck for use of sizeof without parenthesis > > Kernel style uses parenthesis around sizeof. > Nack, there's a difference between "sizeof *task" and "sizeof(struct task_struct)". The former

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread David Rientjes
On Mon, 9 Jul 2012, a...@linux-foundation.org wrote: From: Joe Perches j...@perches.com Subject: checkpatch: Add acheck for use of sizeof without parenthesis Kernel style uses parenthesis around sizeof. Nack, there's a difference between sizeof *task and sizeof(struct task_struct). The

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread Joe Perches
On Mon, 2012-07-09 at 15:23 -0700, David Rientjes wrote: On Mon, 9 Jul 2012, a...@linux-foundation.org wrote: From: Joe Perches j...@perches.com Subject: checkpatch: Add acheck for use of sizeof without parenthesis Kernel style uses parenthesis around sizeof. Nack, there's a

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread David Rientjes
On Mon, 9 Jul 2012, Joe Perches wrote: Huh? Maybe I misunderstand you. $ cat sizeof.c #include stdio.h #include stdlib.h #include strings.h struct foo { int bar[20]; char *baz; }; int main(int argc, char **argv) { struct foo bar; struct foo *baz;

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread Joe Perches
On Mon, 2012-07-09 at 15:55 -0700, David Rientjes wrote: So, nack, don't start enforcing your own coding style and preferences in checkpatch.pl. Not just my opinion. https://lkml.org/lkml/2008/12/23/138 Date: Tue, 23 Dec 2008 10:08:50

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread David Rientjes
On Mon, 9 Jul 2012, Joe Perches wrote: So, nack, don't start enforcing your own coding style and preferences in checkpatch.pl. Not just my opinion. https://lkml.org/lkml/2008/12/23/138 Date: Tue, 23 Dec 2008 10:08:50 -0800

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread Joe Perches
On Mon, 2012-07-09 at 16:47 -0700, David Rientjes wrote: On Mon, 9 Jul 2012, Joe Perches wrote: So, nack, don't start enforcing your own coding style and preferences in checkpatch.pl. Not just my opinion. https://lkml.org/lkml/2008/12/23/138

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread David Rientjes
On Mon, 9 Jul 2012, Joe Perches wrote: CodingStyle already does suggest parenthesis around sizeof 3.1: Spaces Linux kernel style for use of spaces depends (mostly) on function-versus-keyword usage. Use a space after (most) keywords. The notable exceptions are sizeof, typeof, alignof,

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread Joe Perches
On Mon, 2012-07-09 at 18:50 -0700, David Rientjes wrote: On Mon, 9 Jul 2012, Joe Perches wrote: CodingStyle already does suggest parenthesis around sizeof 3.1: Spaces Linux kernel style for use of spaces depends (mostly) on function-versus-keyword usage. Use a space after (most)

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread David Rientjes
On Mon, 9 Jul 2012, Joe Perches wrote: I don't really care what style a large block of code uses. I care that it mostly has the same form. Same form?? The sizeof operator has two forms depending on whether it's a unary expression or a type as specified by the standard. The issue here is

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread Linus Torvalds
On Mon, Jul 9, 2012 at 6:50 PM, David Rientjes rient...@google.com wrote: This doesn't suggest parenthesis for sizeof at all times sizeof without parenthesis is an abomination, and should never be used. Sure, you don't need to have the parenthesis (except when you do - for actual types), but

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread David Rientjes
On Mon, 9 Jul 2012, Linus Torvalds wrote: sizeof without parenthesis is an abomination, and should never be used. Sure, you don't need to have the parenthesis (except when you do - for actual types), but it's a parsing oddity. The sane solution is: just add the f*cking parenthesis, and

Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree

2012-07-09 Thread Joe Perches
On Mon, 2012-07-09 at 19:21 -0700, David Rientjes wrote: On Mon, 9 Jul 2012, Joe Perches wrote: I don't really care what style a large block of code uses. I care that it mostly has the same form. Same form?? The sizeof operator has two forms depending on whether it's a unary