diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-11-13 00:11:12 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-13 04:09:32 +0100 |
commit | e946c43a116526e3d947dc03aeb165c1effd9f8f (patch) | |
tree | 9118f9c6ec4a286e3be3d3e6c38fee8752b6966d /scripts/kernel-doc | |
parent | Documentation/trace/tracepoints.txt: add links to TRACE_EVENT documentation (diff) | |
download | linux-e946c43a116526e3d947dc03aeb165c1effd9f8f.tar.xz linux-e946c43a116526e3d947dc03aeb165c1effd9f8f.zip |
kernel-doc: improve "no structured comments found" error
When using '!Ffile function' in a docbook template, and the function no
longer exists, you get a "no structured comments found" error from the
kernel-doc processing script. It's useful to know which functions it was
looking for, so print them out in this case. Also do the same for '!Pfile
doc-section'
The same error also happens when using '!Efile' when some exported
functions aren't documented (in the same file.) There's a very large
number of such functions though, so don't print the message in this case
-- right now it would give ~850 messages.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Cc: Rob Landley <rob@landley.net>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-x | scripts/kernel-doc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 4305b2f2ec5e..dbd3e1ebbdad 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -257,6 +257,7 @@ my $man_date = ('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December')[(localtime)[4]] . " " . ((localtime)[5]+1900); +my $show_not_found = 0; # Essentially these are globals. # They probably want to be tidied up, made more localised or something. @@ -369,6 +370,8 @@ while ($ARGV[0] =~ m/^-(.*)/) { usage(); } elsif ($cmd eq '-no-doc-sections') { $no_doc_sections = 1; + } elsif ($cmd eq '-show-not-found') { + $show_not_found = 1; } } @@ -2536,6 +2539,9 @@ sub process_file($) { } if ($initial_section_counter == $section_counter) { print STDERR "Warning(${file}): no structured comments found\n"; + if (($function_only == 1) && ($show_not_found == 1)) { + print STDERR " Was looking for '$_'.\n" for keys %function_table; + } if ($output_mode eq "xml") { # The template wants at least one RefEntry here; make one. print "<refentry>\n"; |