[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <70071209bfa07b38df576c59341b935b9b95ae28.camel@sipsolutions.net>
Date: Mon, 05 Jun 2023 10:18:59 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [PATCH 1/2] kernel-doc: don't let V=1 change outcome
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
Powered by blists - more mailing lists