Skip to content

Commit

Permalink
checkpatch: fix ignoring cover-letter logic
Browse files Browse the repository at this point in the history
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.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Stafford Horne <[email protected]>
Acked-by: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
stffrdhrn authored and torvalds committed Oct 4, 2017
1 parent d22e3d6 commit a08ffbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6390,7 +6390,7 @@ sub process {
exit(0);
}

if (!$is_patch && $file !~ /cover-letter\.patch$/) {
if (!$is_patch && $filename !~ /cover-letter\.patch$/) {
ERROR("NOT_UNIFIED_DIFF",
"Does not appear to be a unified-diff format patch\n");
}
Expand Down

0 comments on commit a08ffbe

Please sign in to comment.