Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753995AbbLRWDh (ORCPT ); Fri, 18 Dec 2015 17:03:37 -0500 Received: from e17.ny.us.ibm.com ([129.33.205.207]:57634 "EHLO e17.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752459AbbLRWDf (ORCPT ); Fri, 18 Dec 2015 17:03:35 -0500 X-IBM-Helo: d01dlp03.pok.ibm.com X-IBM-MailFrom: mrochs@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org From: "Matthew R. Ochs" To: Joe Perches , Andy Whitcroft 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 Message-Id: <1450476090-38866-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: 15121822-0041-0000-0000-000002D5EE6E Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1263 Lines: 37 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/