Re: [PATCH 1/4] scripts/kernel-doc: fix logic to handle unissued warnings

From
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date
2026-01-12 11:43:41
Also in
lkml
Reply to
Mauro Carvalho Chehab, 2026-01-12
On Mon, Jan 12, 2026 at 12:23:23PM +0100, Mauro Carvalho Chehab wrote:
Changeset 469c1c9eb6c9 ("kernel-doc: Issue warnings that were silently discarded")
didn't properly addressed the missing messages behavior, as
it was calling directly python logger low-level function,
instead of using the expected method to emit warnings.

Basically, there are two methods to log messages:

- self.config.log.warning() - This is the raw level to emit a
  warning. It just writes the a message at stderr, via python
  logging, as it is initialized as:

    self.config.log = logging.getLogger("kernel-doc")

- self.config.warning() - This is where we actually consider a
  message as a warning, properly incrementing error count.

Due to that, several parsing error messages are internally considered
as success, causing -Werror to not work on such messages.

While here, ensure that the last ignored entry will also be handled
by adding an extra check at the end of the parse handler.
Thanks for addressing these issues, Mauro!

I am not promising I will test this soon, but from code perspective it looks
good to me,
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

-- 
With Best Regards,
Andy Shevchenko

Thread (9 messages) 9 messages, 3 authors, last reply 2026-01-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help