scripts/kernel-doc.py: fix handling of doc output check
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 8 Apr 2025 10:09:18 +0000 (18:09 +0800)
committerJonathan Corbet <corbet@lwn.net>
Wed, 9 Apr 2025 18:10:33 +0000 (12:10 -0600)
commit408269ae35d6b88d48477af56a2376ea05e619ca
tree62dac3a43fad8b209b89af745a2bcbf260e77c0f
parentc3597ab27bc0e5eae23c74a76380000a0f8481e1
scripts/kernel-doc.py: fix handling of doc output check

The filtering logic was seeking for the DOC name to check for
symbols, but such data is stored only inside a section. Add it
to the output_declaration, as it is quicker/easier to check
the declaration name than to check inside each section.

While here, make sure that the output for both ReST and man
after filtering will be similar to what kernel-doc Perl
version does.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/6d8b77af85295452c0191863ea1041f4195aeaaf.1744106242.git.mchehab+huawei@kernel.org
scripts/lib/kdoc/kdoc_output.py
scripts/lib/kdoc/kdoc_parser.py