提交 481eb486 编写于 作者: J Joe Perches 提交者: Linus Torvalds

checkpatch: extend line continuation test

Preprocessor directives and asm statements should be allowed to have a
line continuation.
Signed-off-by: NJoe Perches <joe@perches.com>
Tested-by: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 6cd7f386
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册