Skip to contentSkip to conversation

kernel-doc: prevent duplicate description: output

PATCH New Randy Dunlap 1 participant 1 message Jan 31, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 kernel-doc: prevent duplicate description: output

From: Randy Dunlap <[email protected]>

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.

---

 scripts/kernel-doc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kernel-doc +1 -1
@@ -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;