From: Joe Perches <joe@perches.com>
To: Randy Dunlap <rdunlap@infradead.org>,
Nicolai Fischer <nicolai.fischer@fau.de>,
linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Cc: apw@canonical.com, johannes.czekay@fau.de,
kernel-janitors <kernel-janitors@vger.kernel.org>,
linux-kernel-mentees@lists.linuxfoundation.org,
linux-kernel@i4.cs.fau.de
Subject: Re: [Linux-kernel-mentees] [RFC PATCH] checkpatch: correctly detect lines of help text
Date: Thu, 03 Dec 2020 11:04:11 -0800 [thread overview]
Message-ID: <40543766190a1d5e054e6573ae00112467acf964.camel@perches.com> (raw)
In-Reply-To: <7a81a3c0-2734-4799-5b34-0a6279c1e59d@infradead.org>
On Thu, 2020-12-03 at 10:31 -0800, Randy Dunlap wrote:
> On 12/3/20 9:58 AM, Joe Perches wrote:
> > On Wed, 2020-12-02 at 10:59 -0800, Randy Dunlap wrote:
> >
> > > There are also large hunks of block/Kconfig and drivers/hid/Kconfig
> > > that don't use any indentation for help text...
> > > in case that matters here.
> >
> > Maybe something like this could help.
> >
> > Indent the unindented help blocks by 2 spaces and reflow where appropriate.
> >
> > ---
> > block/Kconfig | 105 +++++-----
> > drivers/hid/Kconfig | 549 +++++++++++++++++++++++++++-------------------------
> > 2 files changed, 335 insertions(+), 319 deletions(-)
>
>
> LGTM. Thanks.
btw: there appears to be ~750 help sections in Kconfig files
that do not use 2 space indentation for the help content vs
the ~14000 help sections that do use 2 space indentation.
Maybe there's some value in standardizing on the 2 space style.
A trivial script to show the sections that don't use 2 spaces:
$ git grep -n -A1 -P "^\s*help\s*$" -- '*/Kconfig*' |
grep -v '^--$' |
perl -e 'while (<>) {
my $line1 = $_;
my $line2 = <>;
my $l1 = $line1;
my $l2 = $line2;
chomp($l1);
chomp($l2);
$l1 =~ s/^.*:\d+:(\s*).*/$1/;
$l2 =~ s/^.*-\d+-(\s*).*/$1/;
if ("$l1 " ne "$l2") {
print "$line1";
print "$line2";
}
}'
Change the ne to eq to see the matches.
For instance, a head -50 of the above is:
arch/Kconfig:84: help
arch/Kconfig-85- This option enables a transparent branch optimization that
arch/Kconfig:127: help
arch/Kconfig-128- If function tracer is enabled and the arch supports full
arch/Kconfig:167: help
arch/Kconfig-168- Modern versions of GCC (since 4.4) have builtin functions
arch/Kconfig:1056: help
arch/Kconfig-1057- An architecture should select this if its syscall numbering is sparse
arch/alpha/Kconfig:147: help
arch/alpha/Kconfig-148- XL-233 and XL-266-based Alpha systems.
arch/arm/Kconfig:1001: help
arch/arm/Kconfig-1002- This option enables the workaround for the 775420 Cortex-A9 (r2p2,
arch/arm/Kconfig-nommu:9: help
arch/arm/Kconfig-nommu-10- Say Y to manually set the base addresses and sizes.
arch/arm/Kconfig.debug:24: help
arch/arm/Kconfig.debug-25- Generate a warning if any W+X mappings are found at boot.
arch/arm/mach-aspeed/Kconfig:21: help
arch/arm/mach-aspeed/Kconfig-22- Say yes if you intend to run on an Aspeed ast2400 or similar
arch/arm/mach-aspeed/Kconfig:31: help
arch/arm/mach-aspeed/Kconfig-32- Say yes if you intend to run on an Aspeed ast2500 or similar
arch/arm/mach-aspeed/Kconfig:42: help
arch/arm/mach-aspeed/Kconfig-43- Say yes if you intend to run on an Aspeed ast2600 or similar
arch/arm/mach-imx/Kconfig:230: help
arch/arm/mach-imx/Kconfig-231- This enables support for Freescale i.MX7 Dual processor.
arch/arm/mach-ixp4xx/Kconfig:41: help
arch/arm/mach-ixp4xx/Kconfig-42- Say 'Y' here if you want your kernel to support the Giant
arch/arm/mach-ixp4xx/Kconfig:178: help
arch/arm/mach-ixp4xx/Kconfig-179- This board is currently inside the Linksys WRV54G Gateways.
arch/arm/mach-ixp4xx/Kconfig:216: help
arch/arm/mach-ixp4xx/Kconfig-217- IXP4xx provides two methods of accessing PCI memory space:
arch/arm/mach-omap1/Kconfig:61: help
arch/arm/mach-omap1/Kconfig-62- TI OMAP 1510 or 1610 Innovator board support. Say Y here if you
arch/arm/mach-omap1/Kconfig:68: help
arch/arm/mach-omap1/Kconfig-69- TI OMAP 1610/1611B H2 board support. Say Y here if you have such
arch/arm/mach-omap1/Kconfig:75: help
arch/arm/mach-omap1/Kconfig-76- TI OMAP 1710 H3 board support. Say Y here if you have such
arch/arm/mach-omap1/Kconfig:88: help
arch/arm/mach-omap1/Kconfig-89- TI OMAP 5912 OSK (OMAP Starter Kit) board support. Say Y here
arch/arm/mach-omap1/Kconfig:95: help
arch/arm/mach-omap1/Kconfig-96- The OSK supports an optional add-on board with a Quarter-VGA
arch/arm/mach-omap1/Kconfig:103: help
arch/arm/mach-omap1/Kconfig-104- Support for TI OMAP 730 Perseus2 board. Say Y here if you have such
arch/arm/mach-omap1/Kconfig:110: help
arch/arm/mach-omap1/Kconfig-111- Support for TI OMAP 850 F-Sample board. Say Y here if you have such
arch/arm/mach-omap1/Kconfig:126: help
arch/arm/mach-omap1/Kconfig-127- Support for the Palm Zire71 PDA. To boot the kernel,
arch/arm/mach-omap1/Kconfig:175: help
arch/arm/mach-omap1/Kconfig-176- Support for generic OMAP-1510, 1610 or 1710 board with
arch/arm/mach-prima2/Kconfig:24: help
arch/arm/mach-prima2/Kconfig-25- Support for CSR SiRFSoC ARM Cortex A9 Platform
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
next parent reply other threads:[~2020-12-03 19:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <133ac827-c0d2-c5c7-39d8-7d2c17de7c76@fau.de>
[not found] ` <8436bc4191d92af283ea6aa7ca450e36da653e2e.camel@perches.com>
[not found] ` <16f0bfd4-61ca-48d8-c9ab-10bfc9a233ad@infradead.org>
[not found] ` <a83033e9fcc706be129e9c4c0d30a0542f13d406.camel@perches.com>
[not found] ` <7a81a3c0-2734-4799-5b34-0a6279c1e59d@infradead.org>
2020-12-03 19:04 ` Joe Perches [this message]
2020-12-03 19:07 ` [Linux-kernel-mentees] [RFC PATCH] checkpatch: correctly detect lines of help text Randy Dunlap
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=40543766190a1d5e054e6573ae00112467acf964.camel@perches.com \
--to=joe@perches.com \
--cc=ak@linux.intel.com \
--cc=apw@canonical.com \
--cc=johannes.czekay@fau.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@i4.cs.fau.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolai.fischer@fau.de \
--cc=rdunlap@infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).