[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87sfzezooh.fsf@meer.lwn.net>
Date: Thu, 12 Aug 2021 09:07:58 -0600
From: Jonathan Corbet <corbet@....net>
To: Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
linux-doc@...r.kernel.org
Cc: linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
Randy Dunlap <rdunlap@...radead.org>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Subject: Re: [PATCH] scripts/kernel-doc: Override -Werror from KCFLAGS with
KDOC_WERROR
Laurent Pinchart <laurent.pinchart+renesas@...asonboard.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@...asonboard.com>
> ---
> scripts/kernel-doc | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Applied, thanks.
jon
Powered by blists - more mailing lists