Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 481eb486 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

checkpatch: extend line continuation test



Preprocessor directives and asm statements should be allowed to have a
line continuation.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Tested-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6cd7f386
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);