diff options
Diffstat (limited to 'scripts/checkpatch.pl')
| -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 1d5b09dd577a..6f2ce0cafe6f 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -2069,6 +2069,7 @@ sub process { | |||
| 2069 | my $is_patch = 0; | 2069 | my $is_patch = 0; |
| 2070 | my $in_header_lines = $file ? 0 : 1; | 2070 | my $in_header_lines = $file ? 0 : 1; |
| 2071 | my $in_commit_log = 0; #Scanning lines before patch | 2071 | my $in_commit_log = 0; #Scanning lines before patch |
| 2072 | my $has_commit_log = 0; #Encountered lines before patch | ||
| 2072 | my $commit_log_possible_stack_dump = 0; | 2073 | my $commit_log_possible_stack_dump = 0; |
| 2073 | my $commit_log_long_line = 0; | 2074 | my $commit_log_long_line = 0; |
| 2074 | my $commit_log_has_diff = 0; | 2075 | my $commit_log_has_diff = 0; |
| @@ -2566,6 +2567,7 @@ sub process { | |||
| 2566 | $rawline =~ /^(commit\b|from\b|[\w-]+:).*$/i)) { | 2567 | $rawline =~ /^(commit\b|from\b|[\w-]+:).*$/i)) { |
| 2567 | $in_header_lines = 0; | 2568 | $in_header_lines = 0; |
| 2568 | $in_commit_log = 1; | 2569 | $in_commit_log = 1; |
| 2570 | $has_commit_log = 1; | ||
| 2569 | } | 2571 | } |
| 2570 | 2572 | ||
| 2571 | # Check if there is UTF-8 in a commit log when a mail header has explicitly | 2573 | # Check if there is UTF-8 in a commit log when a mail header has explicitly |
| @@ -6055,7 +6057,7 @@ sub process { | |||
| 6055 | ERROR("NOT_UNIFIED_DIFF", | 6057 | ERROR("NOT_UNIFIED_DIFF", |
| 6056 | "Does not appear to be a unified-diff format patch\n"); | 6058 | "Does not appear to be a unified-diff format patch\n"); |
| 6057 | } | 6059 | } |
| 6058 | if ($is_patch && $filename ne '-' && $chk_signoff && $signoff == 0) { | 6060 | if ($is_patch && $has_commit_log && $chk_signoff && $signoff == 0) { |
| 6059 | ERROR("MISSING_SIGN_OFF", | 6061 | ERROR("MISSING_SIGN_OFF", |
| 6060 | "Missing Signed-off-by: line(s)\n"); | 6062 | "Missing Signed-off-by: line(s)\n"); |
| 6061 | } | 6063 | } |
