lkml.org 
[lkml]   [2009]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [FOR REVIEW, PATCH 2/2] introduce "struct wait_opts" to simplify do_wait() pathes
(add Andy)

On 05/07, Ingo Molnar wrote:
>
> * Oleg Nesterov <oleg@redhat.com> wrote:
>
> > On 05/06, Ingo Molnar wrote:
> > >
> > > One small nit with the definition above: when using vertical spacing
> > > (which really looks nice) we tend to put the asterix to the type
> > > itself, not to the variable. I.e.:
> > >
> > > enum pid_type wtype;
> > > struct pid * wpid;
> > > int wflags;
> > >
> > > ( This is done to separate the field name from the type - the
> > > pointer nature of the field is part of the type, not part of the
> > > name. )
> >
> > Indeed, I like this more too. But checkpatch.pl disagrees!
>
> That's probably a checkpatch bug mistaking * for multiplication -
> ignore checkpatch in that case and please report it to Andy
> Withcroft as well as well.

No, this is not a bug. From scripts/checkpatch.pl

1667 # Should not end with a space.
1668 $to =~ s/\s+$//;

checkpatch explicitely dislikes "type * name". I think this is
not really right, but I won't insist. Perhaps it is better to
allow tabs before name at least, because this likely means the
code really tries ro look good.


Btw, can't resist,

while ($to =~ s/\*\s+\*/\*\*/) {
}

I think this can be simplified to

$to =~ s/(?<=\*)\s+//g;

Oleg.



\
 
 \ /
  Last update: 2009-05-09 18:21    [W:0.066 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site