mirror-linux/tools/lib
Mauro Carvalho Chehab 292eca3163 docs: kdoc: fix logic to handle unissued warnings
Changeset 469c1c9eb6 ("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.

Fixes: 469c1c9eb6 ("kernel-doc: Issue warnings that were silently discarded")
Closes: https://lore.kernel.org/linux-doc/20260112091053.00cee29a@foz.lan/
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <95109a6585171da4d6900049deaa2634b41ee743.1768823489.git.mchehab+huawei@kernel.org>
2026-01-20 15:31:05 -07:00
..
api libapi: Add missing header with NAME_MAX define to io_dir.h 2025-03-13 00:29:36 -07:00
bpf libbpf: Fix -Wdiscarded-qualifiers under C23 2025-12-09 23:23:21 -08:00
perf libperf: Use 'extern' in LIBPERF_API visibility macro 2025-12-05 10:31:32 -08:00
python docs: kdoc: fix logic to handle unissued warnings 2026-01-20 15:31:05 -07:00
subcmd perf subcmd: avoid crash in exclude_cmds when excludes is empty 2025-09-12 17:51:35 -07:00
symbol tools: Drop nonsensical -O6 2024-09-11 13:08:36 -03:00
thermal tools: lib: thermal: expose thermal_exit symbols 2025-10-03 21:26:00 +02:00
argv_split.c
bitmap.c lib/interval_tree: add test case for interval_tree_iter_xxx() helpers 2025-03-17 12:17:00 -07:00
cmdline.c memblock test: fix implicit declaration of function 'memparse' 2024-08-06 08:21:25 +03:00
ctype.c
find_bit.c
hweight.c
list_sort.c tools/lib/list_sort: remove unnecessary header includes 2024-11-05 17:12:33 -08:00
rbtree.c tools lib rbtree: pick some improvements from the kernel rbtree code 2024-05-08 08:41:27 -07:00
slab.c lib/rbtree: enable userland test suite for rbtree related data structure 2025-03-17 12:17:00 -07:00
str_error_r.c
string.c perf annotate: Add disasm_line__parse() to parse raw instruction for powerpc 2024-07-31 16:12:59 -03:00
vsprintf.c
zalloc.c