From: Joe Perches <joe@perches.com>
To: Robert Elliott <elliott@hpe.com>,
apw@canonical.com, dwaipayanray1@gmail.com,
lukas.bulwahn@gmail.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/5] checkpatch: improve Kconfig help text patch parsing
Date: Wed, 23 Nov 2022 17:09:30 -0800 [thread overview]
Message-ID: <ed9330dd4e1b916a842c1cb0069e880ae5ca8ea2.camel@perches.com> (raw)
In-Reply-To: <20221123011202.939319-2-elliott@hpe.com>
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 <elliott@hpe.com>
> ---
> 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");
> }
> }
>
next prev parent reply other threads:[~2022-11-24 1:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 4:15 [PATCH 0/3] checkpatch: enhance Kconfig parsing Robert Elliott
2022-08-15 4:15 ` [PATCH 1/3] checkpatch: improve Kconfig help text patch parsing Robert Elliott
2022-08-15 4:15 ` [PATCH 2/3] checkpatch: don't sanitise quotes in Kconfig files Robert Elliott
2022-08-15 4:15 ` [PATCH 3/3] checkpatch: check line length in Kconfig help text Robert Elliott
2022-11-23 1:11 ` [PATCH v2 0/5] checkpatch: enhance Kconfig parsing Robert Elliott
2022-11-23 1:11 ` [PATCH v2 1/5] checkpatch: improve Kconfig help text patch parsing Robert Elliott
2022-11-24 1:09 ` Joe Perches [this message]
2022-11-23 1:11 ` [PATCH v2 2/5] checkpatch: don't sanitise quotes in Kconfig files Robert Elliott
2022-11-23 1:12 ` [PATCH v2 3/5] checkpatch: check line length in Kconfig help text Robert Elliott
2022-11-24 1:04 ` Joe Perches
2022-11-23 1:12 ` [PATCH v2 4/5] checkpatch: discard processed lines Robert Elliott
2022-11-24 1:07 ` Joe Perches
2022-11-23 1:12 ` [PATCH v2 5/5] checkpatch: ignore a file named b Robert Elliott
2022-11-24 1:08 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed9330dd4e1b916a842c1cb0069e880ae5ca8ea2.camel@perches.com \
--to=joe@perches.com \
--cc=apw@canonical.com \
--cc=dwaipayanray1@gmail.com \
--cc=elliott@hpe.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®