Currently running checkpatch on a directory with a cover-letter.patch file reports the following error: ----------------------------------------- patches/smp-v2/v2-0000-cover-letter.patch ----------------------------------------- ERROR: Does not appear to be a unified-diff format patch The logic to suppress the unified-diff check for cover letters is there but is checking $file instead of $filename. Fix the variable to use the correct one.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -6390,7 +6390,7 @@ sub process { · 6389 unmodified lines | |||
| 6390 | exit(0); | 6390 | exit(0); |
| 6391 | } | 6391 | } |
| 6392 | 6392 | ||
| 6393 | if (!$is_patch && $file !~ /cover-letter\.patch$/) { | 6393 | if (!$is_patch && $filename !~ /cover-letter\.patch$/) { |
| 6394 | ERROR("NOT_UNIFIED_DIFF", | 6394 | ERROR("NOT_UNIFIED_DIFF", |
| 6395 | "Does not appear to be a unified-diff format patch\n"); | 6395 | "Does not appear to be a unified-diff format patch\n"); |
| 6396 | } | 6396 | } |