Received: by 10.213.65.68 with SMTP id h4csp1143724imn; Sat, 7 Apr 2018 19:15:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/wXaekHSeCSt2Y0lnhQJ1zkfdgSCgmG3TMFFwzwT6NvXhEk39/E4EtZBA1wUqu1pD3nb+w X-Received: by 10.98.80.5 with SMTP id e5mr24985689pfb.131.1523153731348; Sat, 07 Apr 2018 19:15:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523153731; cv=none; d=google.com; s=arc-20160816; b=sip4oaxIWACyhF9yo740ZztcBEtus4wNzj1meQJHRGnVobhCLvbx+IurIx31hTrHn9 ieSXXre0VY37KlpGeUkhnJaOxzOGNIB9dURa8vPAjHxMwBEssaiUfbQWCMVEDw/HPWlK QcuF9mntZ8hRE4/pjpsXXB/2zULqzWCiqlfL9kPpoB7TNPXV+a/RGW3iUIHQ1lJ6wCOJ SBOzX0tp7s850dzA6DSqi7OVHkeDSYnvRA7emTSBztzrMbY74Beg6+CRzKVXos3wRYLP Z2sg2zOjve3hInUYoXPVZQQhLmmvbH4wSq9Q9ZU28m7qpf79IffXDi3S3KjYCI7LhkTc U1ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject:dkim-signature:arc-authentication-results; bh=KTL7bGflyWqKB6E03tTZLn8duQtP3mjQHRHb4RnowI8=; b=dWwhl7iJ2tEDtBVV9KodaR1lZphjqB7De3zcM21XrnD40XO1l9NjZ+fQ1ZBgRAjPvo R7BrTFck5Rbv625cgkABftnfR6PibioKJi2u1JMAVGsqLDEC4uekmSk/HUhoIjgKZ3lJ AumcWBHkLkNojUoGp7cYRvmtwQPsav6lyW26Qv+I38wFqGE9D5jGNUKXxCMaNjYGF4Jr 3ccLHB7fCyooFi9WE/BJb3YnjY3krgzyujX1JOcjn4mVtWkFDgkWzPAswaJjaIi2/eLK 98Rv7hfXE9R7lZhiPcwryOngx5nxRTFTDm8CYzT3EscaInMz9N80Tjlz2tyh4YYqTwzd meWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i6iPoNQs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z23si6947945pgc.484.2018.04.07.19.14.53; Sat, 07 Apr 2018 19:15:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i6iPoNQs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752463AbeDHCML (ORCPT + 99 others); Sat, 7 Apr 2018 22:12:11 -0400 Received: from mail-pl0-f43.google.com ([209.85.160.43]:36394 "EHLO mail-pl0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752068AbeDHCMK (ORCPT ); Sat, 7 Apr 2018 22:12:10 -0400 Received: by mail-pl0-f43.google.com with SMTP id 91-v6so2994336pld.3 for ; Sat, 07 Apr 2018 19:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=KTL7bGflyWqKB6E03tTZLn8duQtP3mjQHRHb4RnowI8=; b=i6iPoNQsr/VNZ53EWDc1KsZl98fpnZ+l6Vfofmvebvw7dPHNa4/pP3VlFhCMmv7zgo NFHEuQEgD2zWHPAPMwhYe1aJU3bDeU3gw4eS8ojFLyY3n/vHwqKPjp5vX/KDycTlUhla l7sG46kOffKpKVXCh1vVdAKyDOevlR9z4Lr7FxIbSbW/H3JJXzOMVoxk3NE3QBPGP2ej jmFnE7anxa2Oaxw62a3Wj3dNdBXL2mB6J+K20cgrSvBVemnLshoM5uFzr8xbdaPnwEXK MkCq1aug0gPtOhSf+W7qWDfiINX1HFPrxIm7GPJInh/d226K0R7nNW5UYZqXquC9iHVh VTCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=KTL7bGflyWqKB6E03tTZLn8duQtP3mjQHRHb4RnowI8=; b=KjyZ9RtNL1xZimnaLiHLnAi9ENIfa6xuqhO6TTezydI9AMe+w5JHZsQJvk1R1rBcxD hHKOKrBY+Tr640dD72ueS8P/CamyKY4oKkQ6pGn7UrBhxtjvBi9wy4aWZwnxm0UC3B4G Y9mAc9/5IlezLcYqvCefc11xsFcRNORlDVIz5cpJ9hUZJxpx+Orsp8ioqPomWt6K3N23 N5hK9Enya6Gh2kdMCImBhyLDKQigm81dpzhNCG4Kwdis+1cml/okOLbI78pnvU8IU9Ck v7o2HNp0aljdWfxRXXL1PR7V7fU582OjSDQVY2OSn4rQKLKKcJiVTV28FsPSizsF6q3+ 8DFA== X-Gm-Message-State: ALQs6tBvX8NjrxFtTsOhh5OyMLeNJNjbxRobhVqKSGY6RAFh672xuV+Z 9TJDZdHvxVMzZSR3OcZBkfI= X-Received: by 2002:a17:902:7702:: with SMTP id n2-v6mr3042612pll.216.1523153529973; Sat, 07 Apr 2018 19:12:09 -0700 (PDT) Received: from [0.0.0.0] (67.216.217.169.16clouds.com. [67.216.217.169]) by smtp.gmail.com with ESMTPSA id q62sm27778198pfd.61.2018.04.07.19.12.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Apr 2018 19:12:09 -0700 (PDT) Subject: Re: [PATCH] checkpatch: relax check for revert commit To: Andy Whitcroft , Joe Perches Cc: linux-kernel@vger.kernel.org, Jia He References: <1522679339-19067-1-git-send-email-hejianet@gmail.com> <1522679339-19067-2-git-send-email-hejianet@gmail.com> From: Jia He Message-ID: Date: Sun, 8 Apr 2018 10:12:07 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1522679339-19067-2-git-send-email-hejianet@gmail.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy & Joe Although it is minor, it is a real bug, I thought. Is there any comment? Thank you --- Cheers, Jia On 4/2/2018 10:28 PM, Jia He Wrote: > For revert commit, it might has two double quotation marks in its > commit log. > > Relax the check condition for revert commit to avoid checkpatch > errors. > > Signed-off-by: Jia He > --- > scripts/checkpatch.pl | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 3d40403..96138d6 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -2643,20 +2643,20 @@ sub process { > $long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i); > $space = 0 if ($line =~ /\bcommit [0-9a-f]/i); > $case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/); > - if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) { > + if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("(.*)"\)/i) { > $orig_desc = $1; > $hasparens = 1; > } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i && > defined $rawlines[$linenr] && > - $rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) { > + $rawlines[$linenr] =~ /^\s*\("(.*)"\)/) { > $orig_desc = $1; > $hasparens = 1; > - } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i && > - defined $rawlines[$linenr] && > - $rawlines[$linenr] =~ /^\s*[^"]+"\)/) { > - $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i; > + } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\(".*$/i && > + defined $rawlines[$linenr] && > + $rawlines[$linenr] =~ /^\s*.*"\)/) { > + $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("(.*)$/i; > $orig_desc = $1; > - $rawlines[$linenr] =~ /^\s*([^"]+)"\)/; > + $rawlines[$linenr] =~ /^\s*(.*)"\)/; > $orig_desc .= " " . $1; > $hasparens = 1; > }