Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757422AbdIIJEN (ORCPT ); Sat, 9 Sep 2017 05:04:13 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33449 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756862AbdIIJEL (ORCPT ); Sat, 9 Sep 2017 05:04:11 -0400 X-Google-Smtp-Source: ADKCNb4GTmw+PvF/dIFRA0uAmUzsyB6psUync5DzBnNQNe2zMVif9EHBkj2Y+B+wcvsvPRYvuEJjeQ== From: Stafford Horne To: joe@perches.com Cc: Stafford Horne , Andy Whitcroft , linux-kernel@vger.kernel.org Subject: [PATCH] checkpatch: Fix ignoring cover-letter logic Date: Sat, 9 Sep 2017 18:04:06 +0900 Message-Id: <20170909090406.31523-1-shorne@gmail.com> X-Mailer: git-send-email 2.13.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1020 Lines: 33 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. Signed-off-by: Stafford Horne --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 2287a0bca863..9e46986e06b8 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -6365,7 +6365,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.13.5