aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2010-03-10 18:22:02 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 18:52:35 -0500
commit4c98ecaf350737cd424eb94140e9e9f1a3408956 (patch)
treed89816372c3398dc496e2970a164d87b211049f6 /scripts
parentb6b6e2b112cafcd63bdbebbffe97279f41e5ca62 (diff)
scripts/kernel-doc: fix empty function description section
scripts/kernel-doc mishandles a function that has a multi-line function short description and no function parameters. The observed problem was from drivers/scsi/scsi_netlink.c: /** * scsi_netlink_init - Called by SCSI subsystem to intialize * the SCSI transport netlink interface * **/ kernel-doc treated the " * " line as a Description: section with only a newline character in the Description contents. This caused output_highlight() to complain: "output_highlight got called with no args?", plus produce a perl call stack backtrace. The fix is just to ignore Description sections if they only contain "\n". Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel-doc2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 208ad3b0ca51..c7865c362d28 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -2103,7 +2103,7 @@ sub process_file($) {
2103 $section = $newsection; 2103 $section = $newsection;
2104 } elsif (/$doc_end/) { 2104 } elsif (/$doc_end/) {
2105 2105
2106 if ($contents ne "") { 2106 if (($contents ne "") && ($contents ne "\n")) {
2107 dump_section($file, $section, xml_escape($contents)); 2107 dump_section($file, $section, xml_escape($contents));
2108 $section = $section_default; 2108 $section = $section_default;
2109 $contents = ""; 2109 $contents = "";