Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8206806rwb; Wed, 23 Nov 2022 17:32:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf69uTlFgUx8Q2kZTetE2FgxRn+/4k/ENxPfBOf5/rCBXygsI2xOoPZqAuAk9kBcQorwHeAi X-Received: by 2002:aa7:c859:0:b0:461:17e9:4ea3 with SMTP id g25-20020aa7c859000000b0046117e94ea3mr27974408edt.49.1669253574289; Wed, 23 Nov 2022 17:32:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669253574; cv=none; d=google.com; s=arc-20160816; b=g4B6bhwYPxY8c9bak5yVqTOKzyplmia1d4S9I1StBujLaUnAENhk9rsuHn8ykSLlXZ kHm1C7gKm/wjQVzI0gi/lmV492gETldsQOysDyiuDCHrq0CwXLdEQplfJVCqydA+GYrp GIY491UWPIHbvJFkNQ5atBjo9YeZiBes87bB15gzhvKIjDBut+7KfbGPzCANDcHzUNFF 3nXm9H50a97aJM3bVkpb0Ah6TTL28fw5/RtIQ7wbYP1YCkdLnc0GW/3mtvErdXuokdAF sElu1P2mfVPr8TldDPLp8lFilSMch7xQGvoBwAV0voxMpIBBZeIenoxK04RWgXmOgWbv RQQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=n1OiJPV7lvst4++ue6WSdgM26pdZ9xcbg2zvww4mGbg=; b=MONC+s2Dt4XMl9UFpT60OQytaosj4PRdeH1Cn6j3nUPgvPm8Lyj2yCE/PxTtwfP4Pc K3MQecSm0UtYU4UQ2gRBzNqyvbgetP8ABd4mPDigqZvVsdxsP7jHdCLAG/PxOOk+nHdO ddVpGc+dLmg644fjb0DH/ixyJ6O4O5K6wPgzhzqhkiegZpGMVBZkxyVCP648Q69vsrue 5WfvPI06J3QYYZcihlFjUhSOmKC6XqPqHG3AbannHX1IvCoZtgoI0ve9RkJmtNQsYzw8 fkwusLkYRs9nQ+iAtCoKkJSwtJ3fHoZjDQmmBONTzBbfTrZVuQi5N8sehAzmFeBdQVq2 H/+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d11-20020aa7d5cb000000b00462e7873c10si1048074eds.337.2022.11.23.17.32.32; Wed, 23 Nov 2022 17:32:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229773AbiKXBJm convert rfc822-to-8bit (ORCPT + 89 others); Wed, 23 Nov 2022 20:09:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229767AbiKXBJh (ORCPT ); Wed, 23 Nov 2022 20:09:37 -0500 Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21B04D9BBC for ; Wed, 23 Nov 2022 17:09:36 -0800 (PST) Received: from omf07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id DC3161A086C; Thu, 24 Nov 2022 01:09:34 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA id 6FB5520027; Thu, 24 Nov 2022 01:09:02 +0000 (UTC) Message-ID: Subject: Re: [PATCH v2 1/5] checkpatch: improve Kconfig help text patch parsing From: Joe Perches To: Robert Elliott , apw@canonical.com, dwaipayanray1@gmail.com, lukas.bulwahn@gmail.com Cc: linux-kernel@vger.kernel.org Date: Wed, 23 Nov 2022 17:09:30 -0800 In-Reply-To: <20221123011202.939319-2-elliott@hpe.com> References: <20220815041548.43744-1-elliott@hpe.com> <20221123011202.939319-1-elliott@hpe.com> <20221123011202.939319-2-elliott@hpe.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_SPF_HELO, KHOP_HELO_FCRDNS,SPF_HELO_PASS,SPF_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Stat-Signature: m4uycm9apfc6o4co68dri37j4n3mo3za X-Rspamd-Server: rspamout02 X-Rspamd-Queue-Id: 6FB5520027 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1+ABedIi3QDFvXZT1EkBZC/0MKq7HOqYbA= X-HE-Tag: 1669252142-307289 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2022-11-22 at 19:11 -0600, Robert Elliott wrote: > While parsing Kconfig help text, allow the strings that affect > parsing (e.g., help, bool, tristate, and prompt) to be in existing > text, not just added text (i.e., allow both + and a space character > at the beginning of the line). > > This improves parsing of a patch like: > > +config CRYPTO_SHA512_S390 > + tristate "SHA384 and SHA512 (s390)" > + depends on S390 > select CRYPTO_HASH > help > - SHA512 secure hash standard (DFIPS 180-2). > + SHA-384 and SHA-512 secure hash algorithms (FIPS 180) > > - This version of SHA implements a 512 bit hash with 256 bits of > - security against collision attacks. > + Architecture: s390 > > - This code also includes SHA-384, a 384 bit hash with 192 bits > - of security against collision attacks. > + It is available as of z10. This would seem to be an invalid patch as it adds a config block. Not sure this is a good change. > > Signed-off-by: Robert Elliott > --- > scripts/checkpatch.pl | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index c8a616a9d034..1d9e563e768a 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -3490,11 +3490,11 @@ sub process { > next if ($f =~ /^-/); > last if ($f !~ /^[\+ ]/); # !patch context > > - if ($f =~ /^\+\s*(?:bool|tristate|prompt)\s*["']/) { > + if ($f =~ /^[\+ ]\s*(?:bool|tristate|prompt)\s*["']/) { > $needs_help = 1; > next; > } > - if ($f =~ /^\+\s*help\s*$/) { > + if ($f =~ /^[\+ ]\s*help\s*$/) { > $has_help = 1; > next; > } > @@ -3519,7 +3519,8 @@ sub process { > $help_length < $min_conf_desc_length) { > my $stat_real = get_stat_real($linenr, $ln - 1); > WARN("CONFIG_DESCRIPTION", > - "please write a help paragraph that fully describes the config symbol\n" . "$here\n$stat_real\n"); > + "please write $min_conf_desc_length lines of help text that fully describes the config symbol (detected $help_length lines)\n" . > + "$here\n$stat_real\n"); > } > } >