lkml.org 
[lkml]   [2016]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: checkpatch falsepositives in Lustre code
From
Date
On Mon, 2016-02-15 at 18:49 -0500, Oleg Drokin wrote:
> Hello!
>
>
>    As I am going over Lustre to clean up the code style, I noticed this bunch below.
>
>    Those all are function definitions, though I guess it might have been foiled by
>    return type on the previous line?
>    Now sure if anything could be done about this.
>
>    Thanks.
>
> ERROR: that open brace { should be on the previous line 
> #2098: FILE: drivers/staging/lustre/lustre/libcfs/hash.c:1358:
> +cfs_ash_for_each_enter(struct cfs_hash *hs)
> +{

[etc...]

Yeah, that's a defect of some type.

I'm not sure if it's really possible to handle it well though.

Maybe there could be a test added for something like

"^[\+ ](?:$Declare\s*|DeclareMisordered\s*)?\$Ident\("

to find what looks like function declarations in the
first column to avoid some of these false positives.

Andy?

\
 
 \ /
  Last update: 2016-02-16 02:41    [W:1.352 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site