mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Matthew R. Ochs" <mrochs@linux.vnet.ibm.com>
To: Joe Perches <joe@perches.com>, Andy Whitcroft <apw@canonical.com>
Cc: linux-kernel@vger.kernel.org, linux@rasmusvillemoes.dk
Subject: [PATCH RESEND] checkpatch: Fix NOT_UNIFIED_DIFF error exception
Date: Fri, 18 Dec 2015 16:01:30 -0600	[thread overview]
Message-ID: <1450476090-38866-1-git-send-email-mrochs@linux.vnet.ibm.com> (raw)

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>
---
I originally sent this out in late September but it appears to
have been missed. As a fix to avoid a false positive warning I'd
like to see it make it to 'next'.

 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


                 reply	other threads:[~2015-12-18 22:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1450476090-38866-1-git-send-email-mrochs@linux.vnet.ibm.com \
    --to=mrochs@linux.vnet.ibm.com \
    --cc=apw@canonical.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®