From: Johannes Berg <johannes@sipsolutions.net>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
linux-doc@vger.kernel.org
Subject: Re: [PATCH 1/2] kernel-doc: don't let V=1 change outcome
Date: Mon, 05 Jun 2023 10:18:59 +0200 [thread overview]
Message-ID: <70071209bfa07b38df576c59341b935b9b95ae28.camel@sipsolutions.net> (raw)
In-Reply-To: <CAK7LNAQ87U202fgqkd5T9G82h4F6sNOMW2=vH1HmgAoVA48CMw@mail.gmail.com>
On Mon, 2023-06-05 at 09:36 +0900, Masahiro Yamada wrote:
> > +if (defined($ENV{'KDOC_WRETURN'})) {
> > + $Wreturn = "$ENV{'KDOC_WRETURN'}";
> > +}
> > +
> > +if (defined($ENV{'KDOC_WSHORT_DESC'})) {
> > + $Wshort_desc = "$ENV{'KDOC_WSHORT_DESC'}";
> > +}
> > +
> > +if (defined($ENV{'KDOC_WCONTENTS_BEFORE_SECTION'})) {
> > + $Wcontents_before_sections = "$ENV{'KDOC_WCONTENTS_BEFORE_SECTION'}";
> > +}
> > +
> > +if (defined($ENV{'KDOC_WALL'})) {
> > + $Wreturn = "$ENV{'KDOC_WALL'}";
> > + $Wshort_desc = "$ENV{'KDOC_WALL'}";
> > + $Wcontents_before_sections = "$ENV{'KDOC_WALL'}";
> > +}
>
>
>
> Adding an environment variable to each of them is tedious.
Agree. And adding one for -Wall is especially tedious because you have
to spell out the list of affected warnings in two places :)
> If you enable -Wall via the command line option,
> these lines are unneeded?
>
> For example,
>
> ifneq ($(KBUILD_EXTRA_WARN),)
> cmd_checkdoc = $(srctree)/scripts/kernel-doc -none \
> $(if $(findstring 2, $(KBUILD_EXTRA_WARN)), -Wall) $<
> endif
>
Yes, that should be possible.
I feel like maybe we should still have individual settings for the three
different classes, because you might want to have -Wshort-desc without
the extra -Wcontents-before-sections (which I thought about removing
entirely, kernel-doc seems to parse just fine that way, what's the point
of it?)
But we could even move the env var handling _completely_ to the Makefile
if you don't mind, and then we don't have to have two places in the
script that need to be aligned all the time.
johannes
next prev parent reply other threads:[~2023-06-05 8:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 21:00 Johannes Berg
2023-06-02 21:00 ` [PATCH 2/2] kbuild: enable kernel-doc -Wall for W=2 Johannes Berg
2023-06-05 0:36 ` [PATCH 1/2] kernel-doc: don't let V=1 change outcome Masahiro Yamada
2023-06-05 8:18 ` Johannes Berg [this message]
2023-06-06 4:21 ` Masahiro Yamada
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=70071209bfa07b38df576c59341b935b9b95ae28.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.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
all inboxes | Powered by JetHome®