summaryrefslogtreecommitdiffstats
path: root/scripts/kernel-doc
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2016-06-10 11:14:05 +0300
committerJani Nikula <jani.nikula@intel.com>2016-06-10 11:29:18 +0300
commit95b6be9d198d964fafd9cbf1dd4d1968291e255c (patch)
tree573cf4c74d23767e96af689d1daba9ec39ecc0f8 /scripts/kernel-doc
parent5668604a6cab13dd5385b8c03a7d55bf92ff0496 (diff)
downloadlinux-stable-95b6be9d198d964fafd9cbf1dd4d1968291e255c.tar.gz
linux-stable-95b6be9d198d964fafd9cbf1dd4d1968291e255c.tar.bz2
linux-stable-95b6be9d198d964fafd9cbf1dd4d1968291e255c.zip
kernel-doc: do not warn about duplicate default section names
Since commit 32217761ee9db0215350dfe1ca4e66f312fb8c54 Author: Jani Nikula <jani.nikula@intel.com> Date: Sun May 29 09:40:44 2016 +0300 kernel-doc: concatenate contents of colliding sections we started getting (more) errors on duplicate section names, especially on the default section name "Description": include/net/mac80211.h:3174: warning: duplicate section name 'Description' This is usually caused by a slightly unorthodox placement of parameter descriptions, like in the above case, and kernel-doc resetting back to the default section more than once within a kernel-doc comment. Ignore warnings on the duplicate section name automatically assigned by kernel-doc, and only consider explicitly user assigned duplicate section names an issue. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-xscripts/kernel-doc7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index ac18eb5ed776..710615f3a4ff 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -542,8 +542,11 @@ sub dump_section {
$new_start_line = 0;
} else {
if (defined($sections{$name}) && ($sections{$name} ne "")) {
- print STDERR "${file}:$.: warning: duplicate section name '$name'\n";
- ++$warnings;
+ # Only warn on user specified duplicate section names.
+ if ($name ne $section_default) {
+ print STDERR "${file}:$.: warning: duplicate section name '$name'\n";
+ ++$warnings;
+ }
$sections{$name} .= $contents;
} else {
$sections{$name} = $contents;