Skip to content

Commit

Permalink
kernel-doc: do not warn about duplicate default section names
Browse files Browse the repository at this point in the history
Since

commit 3221776
Author: Jani Nikula <[email protected]>
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 <[email protected]>
  • Loading branch information
jnikula committed Jun 10, 2016
1 parent 5668604 commit 95b6be9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 95b6be9

Please sign in to comment.