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

Commit a08ffbef authored by Stafford Horne's avatar Stafford Horne Committed by Linus Torvalds
Browse files

checkpatch: fix ignoring cover-letter logic

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/20170909090406.31523-1-shorne@gmail.com


Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
Acked-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d22e3d69
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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");
	}