]> git.itanic.dy.fi Git - linux-stable/commit
kernel-doc: handle a void function without producing a warning
authorRandy Dunlap <rdunlap@infradead.org>
Tue, 26 Dec 2023 06:52:19 +0000 (22:52 -0800)
committerJonathan Corbet <corbet@lwn.net>
Wed, 3 Jan 2024 21:04:31 +0000 (14:04 -0700)
commitafa751e84c30b517aebd418970d222c39c81acb8
tree779393627a813a2d3590906282fd35b131a119a7
parent75ddc07835ab20fcd7b79710ab766bde71873d53
kernel-doc: handle a void function without producing a warning

Currently a void function can produce a warning:
  main.c:469: warning: contents before sections

This one is from arch/x86/kernel/cpu/sgx/main.c (which is not included
in any produced kernel documentation output).

Handle this by setting $in_doc_sect to 1 whenever any recognized
document section name is processed.

Fixes: f624adef3d0b ("kernel-doc: limit the "section header:" detection to a select few")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20231226065219.319-1-rdunlap@infradead.org
scripts/kernel-doc