Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751585AbdIJSIT (ORCPT ); Sun, 10 Sep 2017 14:08:19 -0400 Received: from smtprelay0121.hostedemail.com ([216.40.44.121]:49343 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750933AbdIJSIS (ORCPT ); Sun, 10 Sep 2017 14:08:18 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:69:355:379:541:599:800:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3653:3865:3866:3867:3871:4321:4605:5007:7514:10004:10400:10848:11026:11232:11473:11658:11914:12043:12683:12740:12760:12895:13069:13311:13357:13439:14110:14181:14659:14721:21063:21080:21451:21627:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: guide14_828b141c12c16 X-Filterd-Recvd-Size: 1792 Message-ID: <1505066895.22023.3.camel@perches.com> Subject: Re: [PATCH] checkpatch: Fix ignoring cover-letter logic From: Joe Perches To: Stafford Horne , Andrew Morton Cc: Andy Whitcroft , linux-kernel@vger.kernel.org Date: Sun, 10 Sep 2017 11:08:15 -0700 In-Reply-To: <20170909090406.31523-1-shorne@gmail.com> References: <20170909090406.31523-1-shorne@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 981 Lines: 29 On Sat, 2017-09-09 at 18:04 +0900, Stafford Horne wrote: > 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 Acked-by: Joe Perches > diff --git 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"); > }