Skip to content

Commit 2f4ad40

Browse files
committed
kernel-doc: reset contents and section harder
If the documentation comment does not have params or sections, the section heading may leak from the previous documentation comment. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
1 parent 3221776 commit 2f4ad40

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

scripts/kernel-doc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2763,6 +2763,8 @@ sub process_file($) {
27632763
}
27642764

27652765
$state = STATE_FIELD;
2766+
$contents = "";
2767+
$section = $section_default;
27662768
if (/-(.*)/) {
27672769
# strip leading/trailing/multiple spaces
27682770
$descr= $1;
@@ -2960,6 +2962,7 @@ sub process_file($) {
29602962
elsif (/$doc_end/)
29612963
{
29622964
dump_doc_section($file, $section, xml_escape($contents));
2965+
$section = $section_default;
29632966
$contents = "";
29642967
$function = "";
29652968
%parameterdescs = ();

0 commit comments

Comments
 (0)