Skip to content

Commit 95b6be9

Browse files
committed
kernel-doc: do not warn about duplicate default section names
Since commit 3221776 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>
1 parent 5668604 commit 95b6be9

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

scripts/kernel-doc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,11 @@ sub dump_section {
542542
$new_start_line = 0;
543543
} else {
544544
if (defined($sections{$name}) && ($sections{$name} ne "")) {
545-
print STDERR "${file}:$.: warning: duplicate section name '$name'\n";
546-
++$warnings;
545+
# Only warn on user specified duplicate section names.
546+
if ($name ne $section_default) {
547+
print STDERR "${file}:$.: warning: duplicate section name '$name'\n";
548+
++$warnings;
549+
}
547550
$sections{$name} .= $contents;
548551
} else {
549552
$sections{$name} = $contents;

0 commit comments

Comments
 (0)