* kernel-doc -Werror regression
@ 2026-01-09 11:07 Jani Nikula
2026-01-12 8:10 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 2+ messages in thread
From: Jani Nikula @ 2026-01-09 11:07 UTC (permalink / raw)
To: linux-doc; +Cc: Jonathan Corbet, Mauro Carvalho Chehab
Mauro, Jon -
It seems to me with the kernel-doc conversion from perl to python we've
lost a huge amount of -Werror handling. AFAICS none of the warnings from
kdoc_parser.py using emit_msg() lead to a non-zero exit status from
kernel-doc.
BR,
Jani.
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: kernel-doc -Werror regression
2026-01-09 11:07 kernel-doc -Werror regression Jani Nikula
@ 2026-01-12 8:10 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2026-01-12 8:10 UTC (permalink / raw)
To: Jani Nikula; +Cc: linux-doc, Jonathan Corbet, Mauro Carvalho Chehab
Hi Jani,
Em Fri, 09 Jan 2026 13:07:02 +0200
Jani Nikula <jani.nikula@intel.com> escreveu:
> Mauro, Jon -
>
> It seems to me with the kernel-doc conversion from perl to python we've
> lost a huge amount of -Werror handling. AFAICS none of the warnings from
> kdoc_parser.py using emit_msg() lead to a non-zero exit status from
> kernel-doc.
The culprit was not the conversion, but this change:
469c1c9eb6c9 ("kernel-doc: Issue warnings that were silently discarded")
which effectively broke most of -W<foo> command line arguments.
I mentioned it back then:
https://lore.kernel.org/linux-doc/3fnulqi7hfplggfqevab525clikq7fnsnt72lauddzy32sepyq@maux2bgqa3np/
-
After the conversion, the errors detected during the parsing
phase were moved to be displayed/handled at the output phase.
There, when an error occurs, self.errors is incremented at:
tools/lib/python/kdoc/kdoc_files.py
Then, at kernel-doc.py, we have:
error_count = kfiles.errors
if not error_count:
sys.exit(0)
if args.werror:
print("%s warnings as errors" % error_count) # pylint: disable=C0209
sys.exit(error_count)
Patch 469c1c9eb6c9 broke it, among other things, as it now emits
errors at parsing time, breaking the logic that inhibits errors
with -W<foo>, and breaking -Werror as well, as the error is not
counted anymore.
That's said, there is another issue there as well, which I hadn't
time yet to fix: we can't do sys.exit(error_count), as the return
code is an 8-bit value.
I'll work on a patch series to address such issues along the week.
Thanks,
Mauro
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-12 8:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-09 11:07 kernel-doc -Werror regression Jani Nikula
2026-01-12 8:10 ` Mauro Carvalho Chehab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox