From: Joe Perches Date: Tue, 18 Dec 2012 00:01:56 +0000 (-0800) Subject: checkpatch: extend line continuation test X-Git-Tag: v3.8-rc1~74^2~100 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=481eb486a88c9b068f0168ac4c21291802720933;p=profile%2Fcommon%2Fkernel-common.git checkpatch: extend line continuation test Preprocessor directives and asm statements should be allowed to have a line continuation. Signed-off-by: Joe Perches Tested-by: Jingoo Han Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 6fa1677..3e9fee6 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);