From: Jonathan Corbet <corbet@lwn.net>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
linux-doc@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
Randy Dunlap <rdunlap@infradead.org>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: Re: [PATCH] scripts/kernel-doc: Override -Werror from KCFLAGS with KDOC_WERROR
Date: Thu, 12 Aug 2021 09:07:58 -0600 [thread overview]
Message-ID: <87sfzezooh.fsf@meer.lwn.net> (raw)
In-Reply-To: <20210730225401.4401-1-laurent.pinchart+renesas@ideasonboard.com>
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> writes:
> Since commit 2c12c8103d8f ("scripts/kernel-doc: optionally treat
> warnings as errors"), the kernel-doc script will treat warnings as
> errors when one of the following conditions is true:
>
> - The KDOC_WERROR environment variable is non-zero
> - The KCFLAGS environment variable contains -Werror
> - The -Werror parameter is passed to kernel-doc
>
> Checking KCFLAGS for -Werror allows piggy-backing on the C compiler
> error handling. However, unlike the C compiler, kernel-doc has no
> provision for -Wno-error. This makes compiling the kernel with -Werror
> (to catch regressions) and W=1 (to enable more checks) always fail,
> without the same possibility as offered by the C compiler to treating
> some selected warnings as warnings despite the global -Werror setting.
>
> To fix this, evaluate KDOC_WERROR after KCFLAGS, which allows disabling
> the warnings-as-errors behaviour of kernel-doc selectively by setting
> KDOC_WERROR=0.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> scripts/kernel-doc | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Applied, thanks.
jon
prev parent reply other threads:[~2021-08-12 15:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-30 22:54 [PATCH] scripts/kernel-doc: Override -Werror from KCFLAGS with KDOC_WERROR Laurent Pinchart
2021-08-12 15:07 ` Jonathan Corbet [this message]
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=87sfzezooh.fsf@meer.lwn.net \
--to=corbet@lwn.net \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--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