From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932230AbdCWIBn (ORCPT ); Thu, 23 Mar 2017 04:01:43 -0400 Received: from smtprelay0149.hostedemail.com ([216.40.44.149]:57135 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932117AbdCWIBk (ORCPT ); Thu, 23 Mar 2017 04:01:40 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:800:960:973:982:988:989:1260:1345:1437:1534:1541:1711:1730:1747:1777:1792:2393:2559:2562:2902:3138:3139:3140:3141:3142:3352:3865:3866:3867:3868:3870:3872:3874:4321:4605:5007:6119:6261:7903:8531:10004:10848:11026:11657:11658:11914:12043:12555:12895:13069:13161:13221:13229:13311:13357:14181:14384:14394:14721:14777:21080:21433:21451:30022:30026:30054:30070,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: level51_2f8af2c489534 X-Filterd-Recvd-Size: 2011 From: Joe Perches To: Andrew Morton , Andy Whitcroft Cc: "John 'Warthog9' Hawley" , Darren Hart , linux-kernel@vger.kernel.org Subject: [PATCH] checkpatch: Allow space leading blank lines in email headers Date: Wed, 22 Mar 2017 22:35:21 -0700 Message-Id: X-Mailer: git-send-email 2.10.0.rc2.1.g053435c Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Allow a leading space and otherwise blank link in the email headers as it can be a line wrapped Spamassassin multiple line string or any other valid rfc 2822/5322 email header. The line with space causes checkpatch to erroniously think that it's in the content body, as opposed to headers and thus flag a mail header as an unwrapped long comment line. Reported-by: Darren Hart (VMware) Original-patch-by: John 'Warthog9' Hawley (VMware) Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 832e8150dba3..089c974aa3a5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2628,8 +2628,8 @@ sub process { # Check if it's the start of a commit log # (not a header line and we haven't seen the patch filename) if ($in_header_lines && $realfile =~ /^$/ && - !($rawline =~ /^\s+\S/ || - $rawline =~ /^(commit\b|from\b|[\w-]+:).*$/i)) { + !($rawline =~ /^\s+(?:\S|$)/ || + $rawline =~ /^(?:commit\b|from\b|[\w-]+:)/i)) { $in_header_lines = 0; $in_commit_log = 1; $has_commit_log = 1; -- 2.10.0.rc2.1.g053435c