diff options
author | Joe Perches <joe@perches.com> | 2012-12-18 01:01:56 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-18 02:15:19 +0100 |
commit | 481eb486a88c9b068f0168ac4c21291802720933 (patch) | |
tree | ded9373e9ace9887f28c8bf3ea1810c600a6b059 /scripts | |
parent | checkpatch: allow control over line length warning, default remains 80 (diff) | |
download | linux-481eb486a88c9b068f0168ac4c21291802720933.tar.xz linux-481eb486a88c9b068f0168ac4c21291802720933.zip |
checkpatch: extend line continuation test
Preprocessor directives and asm statements should be allowed to have a
line continuation.
Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 6fa167758f82..3e9fee60642c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3009,10 +3009,12 @@ sub process { } } -# check for line continuations outside of #defines +# check for line continuations outside of #defines, preprocessor #, and asm } else { if ($prevline !~ /^..*\\$/ && + $line !~ /^\+\s*\#.*\\$/ && # preprocessor + $line !~ /^\+.*\b(__asm__|asm)\b.*\\$/ && # asm $line =~ /^\+.*\\$/) { WARN("LINE_CONTINUATIONS", "Avoid unnecessary line continuations\n" . $herecurr); |