summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2016-05-30 11:21:06 +0300
committerJani Nikula <jani.nikula@intel.com>2016-05-30 13:39:04 +0300
commit2f4ad40a05265827848200689094348363027069 (patch)
treee7328acba926106aaff961e10e31146b841cafc0 /scripts
parent32217761ee9db0215350dfe1ca4e66f312fb8c54 (diff)
downloadlinux-2f4ad40a05265827848200689094348363027069.tar.gz
linux-2f4ad40a05265827848200689094348363027069.tar.bz2
linux-2f4ad40a05265827848200689094348363027069.zip
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel-doc3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 3ac4b57ed76a..0eb2e7b5bf10 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 = ();