]> err.no Git - linux-2.6/commitdiff
kernel-doc: prevent duplicate description: output
authorRandy Dunlap <randy.dunlap@oracle.com>
Thu, 7 Feb 2008 08:13:41 +0000 (00:13 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 7 Feb 2008 16:42:17 +0000 (08:42 -0800)
Prevent duplicate output of a Description: section when there is a "blank"
("*") line between the initial function name/description line and the
"Description:" header.

Test case:  drivers/scsi/scsi_devinfo.c::scsi_init_devinfo().

Rob Landley hit this while he was producing SCSI kernel-doc.

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>
scripts/kernel-doc

index 1c1d350b49015d356d8afb39c3e4bf721ea89b9e..7df099e6d1fd7c8e8081e91ae17dcb3be42034bb 100755 (executable)
@@ -1907,7 +1907,7 @@ sub process_file($) {
                $newsection = $1;
                $newcontents = $2;
 
-               if ($contents ne "") {
+               if (($contents ne "") && ($contents ne "\n")) {
                    if (!$in_doc_sect && $verbose) {
                        print STDERR "Warning(${file}:$.): contents before sections\n";
                        ++$warnings;