Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp570680pxb; Wed, 18 Aug 2021 08:51:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxh0duy9lmeBymBHuU/9Bg8LzB909nc78IE5N7jfNzuOBpbswtOo8FMkg+D56TMLKwwI2Ln X-Received: by 2002:a17:906:c316:: with SMTP id s22mr10609797ejz.39.1629301890940; Wed, 18 Aug 2021 08:51:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629301890; cv=none; d=google.com; s=arc-20160816; b=IwM4uhklsr1VxgHw2Rc2NJ1aqUjoR2lXB5MK8ze/egjUbelmiM18UOd2VxuVozYvDf GCcnI35uJypizMRlhPa5V+at4az+IpgScBaHWynGHS7UmFknB+AO2JUlG0afOwMYlZEY Q5qav0VV6HjvOqoHGkNTYo/6JFxqwXALeOd1FTfKkLiZI7m5Tu9wJslAMd2wzOIXwSrk poMDXBHP+7ifPyyCH7oNXnkDsQna1zOlKIHu8UWRGtDhhs6I8ifOdTXDUO6IRDg0qAfn MQEcFnBR0Jiap4UZWiFTldHPCBiM7ZPYif27NKjSI81GoQnLRaVqdg63Rvc/8uddOZ8X wbTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Ly8XYYipoD2ui1uOI6rBTuBqM3/79CjvaDtgsH2un6s=; b=FQ7lye3465XVD6va1yhRwfluKJAwCUoVCLrMt+AZo2XYU4Bqbssr2R/R98bHIoqBLR BapUm/M7AwPY+y3o4JrWfXPrU2GFu1XHgzbPtadB4+gTgXcaKhH6xy64G122HZAlARDX m2DsYpaMXY8DgtwfnN2ePcHmsgHict33JtB3hJQ94ZlcBZe+4UIeaizQdSkFawy1vEnZ Fv6MrzB6icFgj9xlANq5BbJYGdH7Irtm6abdYyztD34VEcTkbbk/W3Vm1uP05RvK0lDg c7EPcEPQh5+txOTd8Bzkb9bczWXsXohIyJxCU3a2E4zxqVw7OTIavOCRVeIPRewXmhat FrlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jj25si297696ejc.311.2021.08.18.08.51.05; Wed, 18 Aug 2021 08:51:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240066AbhHRPsE (ORCPT + 99 others); Wed, 18 Aug 2021 11:48:04 -0400 Received: from mail-lf1-f46.google.com ([209.85.167.46]:46828 "EHLO mail-lf1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240052AbhHRPry (ORCPT ); Wed, 18 Aug 2021 11:47:54 -0400 Received: by mail-lf1-f46.google.com with SMTP id u22so5519459lfq.13; Wed, 18 Aug 2021 08:47:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ly8XYYipoD2ui1uOI6rBTuBqM3/79CjvaDtgsH2un6s=; b=XW3u26JgYxM1wF0meHea8JFbo6/nBp8Tbq8k/8JqspU60V3D0cWPitDsQNVpzGucGi e5idfJPecmpzQxuLu3YYTg+6/pIjMRj/wljhkLs3CiLRoc8tcGNsy3zx2fJPJu23vWFp qQ73j/UO8BhCvQfwblYcQExEZNk+nhshrwyq/U7N/m5uzkOuuG+/eC7WBHJ9Xmh+aR3k 8C1AO1GG/Lwy/w7LpcLdxkpg9mwpmH6WIYQG+OD+x5bfZjKVwp9bg1/eXzyKcKSWjdW6 ko0xT73YYqpjcY1GITCy5/ZMOhLqObx28zK+39Gd8uudmY+N/Q0e6QF4fW5XvmoBui+V hUaw== X-Gm-Message-State: AOAM532l9FtUfIYm3uu5EcrGsjaX0QqmPDP+NklBVgj8eD8RZTJvUYRb +8d3SiV4Fuam9jy+SAeLzc1rJUH25uTOUXt+ X-Received: by 2002:ac2:4185:: with SMTP id z5mr6821837lfh.391.1629301637805; Wed, 18 Aug 2021 08:47:17 -0700 (PDT) Received: from localhost.localdomain (broadband-188-32-236-56.ip.moscow.rt.ru. [188.32.236.56]) by smtp.googlemail.com with ESMTPSA id j4sm23808ljh.120.2021.08.18.08.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Aug 2021 08:47:17 -0700 (PDT) From: Denis Efremov To: linux-kselftest@vger.kernel.org Cc: Denis Efremov , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Jens Axboe , Jiri Kosina , Willy Tarreau , Joe Perches Subject: [RFC PATCH 1/5] checkpatch: improve handling of revert commits Date: Wed, 18 Aug 2021 18:46:42 +0300 Message-Id: <20210818154646.925351-2-efremov@linux.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210818154646.925351-1-efremov@linux.com> References: <20210818154646.925351-1-efremov@linux.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Properly handle commits like: commit f2791e7eadf4 ("Revert "floppy: refactor open() flags handling"") Cc: Joe Perches Signed-off-by: Denis Efremov --- scripts/checkpatch.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 461d4221e4a4..cf31e8c994d3 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3200,20 +3200,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 && + } 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; + $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; } -- 2.31.1