From: Hidetoshi Seto Date: Fri, 5 Mar 2010 21:43:50 +0000 (-0800) Subject: checkpatch: trivial fix for trailing statements check X-Git-Tag: v2.6.34-rc1~71 X-Git-Url: http://ftp.safe.ca/?a=commitdiff_plain;h=42bdf74c95b6935f3c09a09ba4bead6cad11b540;hp=42bdf74c95b6935f3c09a09ba4bead6cad11b540;p=safe%2Fjmp%2Flinux-2.6 checkpatch: trivial fix for trailing statements check In case if the statement and the conditional are in one line, the line appears in the report doubly. And items of this check have no blank line before the next item. This patch fixes these trivial problems, to improve readability of the report. [sample.c] > if (cond1 > && cond2 > && cond3) func_foo(); > > if (cond4) func_bar(); Before: > ERROR: trailing statements should be on next line > #1: FILE: sample.c:1: > +if (cond1 > [...] > + && cond3) func_foo(); > ERROR: trailing statements should be on next line > #5: FILE: sample.c:5: > +if (cond4) func_bar(); > +if (cond4) func_bar(); > total: 2 errors, 0 warnings, 5 lines checked After: > ERROR: trailing statements should be on next line > #1: FILE: sample.c:1: > +if (cond1 > [...] > + && cond3) func_foo(); > > ERROR: trailing statements should be on next line > #5: FILE: sample.c:5: > +if (cond4) func_bar(); > > total: 2 errors, 0 warnings, 5 lines checked Signed-off-by: Hidetoshi Seto Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ---