From: Jani Nikula Date: Mon, 30 May 2016 08:21:06 +0000 (+0300) Subject: kernel-doc: reset contents and section harder X-Git-Tag: v5.15~13065^2~37^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f4ad40a05265827848200689094348363027069;p=platform%2Fkernel%2Flinux-starfive.git 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 --- diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 3ac4b57..0eb2e7b 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -2763,6 +2763,8 @@ sub process_file($) { } $state = STATE_FIELD; + $contents = ""; + $section = $section_default; if (/-(.*)/) { # strip leading/trailing/multiple spaces $descr= $1; @@ -2960,6 +2962,7 @@ sub process_file($) { elsif (/$doc_end/) { dump_doc_section($file, $section, xml_escape($contents)); + $section = $section_default; $contents = ""; $function = ""; %parameterdescs = ();