lkml.org 
[lkml]   [2013]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: scripts: checkpatch.pl & Lindent (minor complaint)
From
Date
On Tue, 2013-11-12 at 09:42 -0500, Mimi Zohar wrote: 
> scripts/Lindent and scripts/checkpatch disagree whether the fields in a
> statically initialized array should be blank separated.
>
> static struct ima_rule_entry default_rules[] = {
> {.action = DONT_MEASURE,.fsmagic = PROC_SUPER_MAGIC,.flags = IMA_FSMAGIC},
>
> Lindent adds a blank before '.fsmagic', which checkpatch then complains
> about (eg. commit 75834fc3).

Perhaps I don't understand what you mean.

Lindent _doesn't_add a blank and checkpatch
seems to do the right thing here.

I'd just as soon delete Lindent.

$ git log --format=email -p -1 75834fc3 | ./scripts/checkpatch.pl -
WARNING: line over 80 characters
#35: FILE: security/integrity/ima/ima_policy.c:52:
+ {.action = DONT_MEASURE,.fsmagic = PROC_SUPER_MAGIC,.flags = IMA_FSMAGIC},

ERROR: space required after that ',' (ctx:VxV)
#35: FILE: security/integrity/ima/ima_policy.c:52:
+ {.action = DONT_MEASURE,.fsmagic = PROC_SUPER_MAGIC,.flags = IMA_FSMAGIC},
^
[...]

$ ./scripts/Lindent security/integrity/ima/ima_policy.c
$ git diff security/integrity/ima/ima_policy.c | ./scripts/checkpatch.pl -
ERROR: space required after that ',' (ctx:VxV)
#10: FILE: security/integrity/ima/ima_policy.c:72:
+ {.action = DONT_MEASURE,.fsmagic = PROC_SUPER_MAGIC,.flags =
^

ERROR: space required after that ',' (ctx:VxV)
#10: FILE: security/integrity/ima/ima_policy.c:72:
+ {.action = DONT_MEASURE,.fsmagic = PROC_SUPER_MAGIC,.flags =
^
[...]




\
 
 \ /
  Last update: 2013-11-13 02:21    [W:0.053 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site