aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl12
1 files changed, 4 insertions, 8 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9fb30b15c9dc..59fa00e97878 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2049,16 +2049,12 @@ sub process {
2049 } 2049 }
2050 2050
2051# Check for user-visible strings broken across lines, which breaks the ability 2051# Check for user-visible strings broken across lines, which breaks the ability
2052# to grep for the string. Limited to strings used as parameters (those 2052# to grep for the string. Make exceptions when the previous string ends in a
2053# following an open parenthesis), which almost completely eliminates false 2053# newline (multiple lines in one string constant) or '\t', '\r', ';', or '{'
2054# positives, as well as warning only once per parameter rather than once per 2054# (common in inline assembly) or is a octal \123 or hexadecimal \xaf value
2055# line of the string. Make an exception when the previous string ends in a
2056# newline (multiple lines in one string constant) or \n\t (common in inline
2057# assembly to indent the instruction on the following line).
2058 if ($line =~ /^\+\s*"/ && 2055 if ($line =~ /^\+\s*"/ &&
2059 $prevline =~ /"\s*$/ && 2056 $prevline =~ /"\s*$/ &&
2060 $prevline =~ /\(/ && 2057 $prevrawline !~ /(?:\\(?:[ntr]|[0-7]{1,3}|x[0-9a-fA-F]{1,2})|;\s*|\{\s*)"\s*$/) {
2061 $prevrawline !~ /\\n(?:\\t)*"\s*$/) {
2062 WARN("SPLIT_STRING", 2058 WARN("SPLIT_STRING",
2063 "quoted string split across lines\n" . $hereprev); 2059 "quoted string split across lines\n" . $hereprev);
2064 } 2060 }