diff options
| author | Simon Sudarushkin <simonsudarushkin@gmail.com> | 2026-09-29 18:36:05 +0500 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2026-11-02 09:28:27 -0700 |
| commit | 2649344d20dfb13e30b560f06138229d8e40350a (patch) | |
| tree | f36f33ed9a384a91d57f16842f001289b3df0900 /scripts/atomic/fallbacks/inc_not_zero | |
| parent | ff8108b54c98d7060a839a3599674e07dfa36526 (diff) | |
| download | lwn-docs-mw.tar.gz lwn-docs-mw.zip | |
ManFormat.msg() appends the "SEE ALSO" tail after every call to the base
class msg(), even when the -e, -i, -s or --nosymbol filters dropped the
symbol and nothing was written for it. With -s, every other symbol in
the file leaves a stray "SEE ALSO" block behind the requested page. With
-e on a file that exports nothing, the output is only such blocks, with
no .TH header at all:
$ tools/docs/kernel-doc -man -s string_get_size lib/string_helpers.c \
| grep -c 'SEE ALSO'
13
$ tools/docs/kernel-doc -man -e include/rdma/ib_mad.h | grep -c '^\.TH'
0
Only add the tail when the base class produced a page, and add unit
tests for both cases.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Closes: https://lore.kernel.org/all/fc7978bb-a71f-456d-84bb-670c8f0426ed@infradead.org/
Fixes: 104e0a682e12 ("tools: kernel-doc: add a see also section at man pages")
Assisted-by: LLM
Signed-off-by: Simon Sudarushkin <simonsudarushkin@gmail.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260929-kdoc-man-filter-v1-1-5f70268885d1@gmail.com>
Diffstat (limited to 'scripts/atomic/fallbacks/inc_not_zero')
0 files changed, 0 insertions, 0 deletions
