From: Andy Whitcroft Date: Tue, 26 Oct 2010 21:23:18 +0000 (-0700) Subject: checkpatch: clean up structure definition macro handline X-Git-Tag: v3.0~3010^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5eaa20b984eb316533b4a098d8de3912e434df6a;p=platform%2Fkernel%2Flinux-amlogic.git checkpatch: clean up structure definition macro handline Handle definitions such as the following correctly, it is not a complex statement: #define PREALLOC(NAME, START, END, FLAGS) { \ .name = (NAME), \ .start = (START), \ .end = (END), \ .flags = (FLAGS) \ }, Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 53b2eae..d5361e4 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2476,8 +2476,8 @@ sub process { \.$Ident\s*=\s*| ^\"|\"$ }x; - #print "REST<$rest> dstat<$dstat>\n"; - if ($rest ne '') { + #print "REST<$rest> dstat<$dstat> ctx<$ctx>\n"; + if ($rest ne '' && $rest ne ',') { if ($rest !~ /while\s*\(/ && $dstat !~ /$exceptions/) {