lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <74a53856-281d-0443-1141-af116abab991@infradead.org>
Date:   Wed, 8 Jun 2022 07:41:59 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Niklas Söderlund <niklas.soderlund@...igine.com>,
        Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, oss-drivers@...igine.com,
        Simon Horman <simon.horman@...igine.com>,
        Louis Peens <louis.peens@...igine.com>
Subject: Re: [PATCH] scripts: kernel-doc: Always increment warnings counter



On 6/8/22 07:26, Niklas Söderlund wrote:
> Some warnings did not increment the warnings counter making the behavior
> of running kernel-doc with -Werror unlogical as some warnings would be
> generated but not treated as errors.
> 
> Fix this by always incrementing the warnings counter every time a
> warning related to the input documentation is generated. There is one
> location in get_sphinx_version() where a warning is printed and the
> counter is not touched as it concerns the execution environment of the
> kernel-doc and not the documentation being processed.
> 
> Incrementing the counter only have effect when running kernel-doc in
> either verbose mode (-v or environment variable KBUILD_VERBOSE) or when
> treating warnings as errors (-Werror or environment variable
> KDOC_WERROR). In both cases the number of warnings printed is printed to
> stderr and for the later the exit code of kernel-doc is non-zero if
> warnings where encountered.
> 
> Simple test case to demo one of the warnings,
> 
>     $ cat test.c
>     /**
>      * foo() - Description
>      */
>     int bar();
> 
>     # Without this change
>     $ ./scripts/kernel-doc -Werror -none test.c
>     test.c:4: warning: expecting prototype for foo(). Prototype was for
>     bar() instead
> 
>     # With this change
>     $ ./scripts/kernel-doc -Werror -none test.c
>     test.c:4: warning: expecting prototype for foo(). Prototype was for
>     bar() instead
>     1 warnings as Errors
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund@...igine.com>
> Signed-off-by: Simon Horman <simon.horman@...igine.com>
> Signed-off-by: Louis Peens <louis.peens@...igine.com>
> ---
>  scripts/kernel-doc | 10 ++++++++++
>  1 file changed, 10 insertions(+)

LGTM. Thanks.

Reviewed-by: Randy Dunlap <rdunlap@...radead.org>

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ