lkml.org 
[lkml]   [2012]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/1] checkpatch.pl: thou shalt not use () or (...) in function declarations
From
Date
On Thu, 2012-03-22 at 16:49 +0100, richard -rw- weinberger wrote:
> On Thu, Mar 22, 2012 at 4:27 PM, Phil Carmody
> <ext-phil.2.carmody@nokia.com> wrote:
> > After HPA's wonderful lkml post, referenced, it seems worth trying to
> > detect this robomatically.
>
> See:
> http://marc.info/?l=linux-kernel&m=133193918813599

But Phil's test is better because it also
tests for function declarations on multiple
lines like

type
foo(...)

if ($ctx =~ /((\b$Type\s+$Ident)\s*\(\s*(?:\.\.\.)?\s*\))/) {

The ERROR needs updating for a --ignore type though.
Something like this may be better.

ERROR("FUNCTION_NO_PROTOTYPE",
"Bad function definition - $1 should probably be $2(void)\n" .
herecurr);

And I think the screed funny once but not useful.




\
 
 \ /
  Last update: 2012-03-22 17:35    [W:0.116 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site