From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753509AbbIWTve (ORCPT ); Wed, 23 Sep 2015 15:51:34 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:36500 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751710AbbIWTvd (ORCPT ); Wed, 23 Sep 2015 15:51:33 -0400 X-IBM-Helo: d03dlp03.boulder.ibm.com X-IBM-MailFrom: mrochs@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org From: "Matthew R. Ochs" To: linux-kernel@vger.kernel.org, joe@perches.com, apw@canonical.com Cc: linux@rasmusvillemoes.dk, "Matthew R. Ochs" Subject: [PATCH] checkpatch: Fix NOT_UNIFIED_DIFF error exception Date: Wed, 23 Sep 2015 14:50:51 -0500 Message-Id: <1443037851-59739-1-git-send-email-mrochs@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15092319-0021-0000-0000-0000131D7FD7 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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