mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] checkpatch: Fix NOT_UNIFIED_DIFF error exception
@ 2015-09-23 19:50 Matthew R. Ochs
  0 siblings, 0 replies; only message in thread
From: Matthew R. Ochs @ 2015-09-23 19:50 UTC (permalink / raw)
  To: linux-kernel, joe, apw; +Cc: linux, Matthew R. Ochs

Commit 06330fc40e3f ("checkpatch: Avoid NOT_UNIFIED_DIFF
errors on cover-letter.patch files") added an exception to bypass
the unified-diff check for cover letters. The patch evaluates the
cover letter regex against $file. Instead it should use $filename.

This patch corrects the variable.

Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index f2a1131..fdb1e48 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5808,7 +5808,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");
 	}
-- 
2.1.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-23 19:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-23 19:50 [PATCH] checkpatch: Fix NOT_UNIFIED_DIFF error exception Matthew R. Ochs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®