Skip to contentSkip to conversation

scripts/kernel-doc: make unknown function prototype a Warning instead of an Error

PATCH In review Randy Dunlap 3 participants 3 messages Oct 17, 2013 – Nov 7, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/kernel-doc: make unknown function prototype a Warning instead of an Error

From: Randy Dunlap <[email protected]>

When scripts/kernel-doc cannot understand a function prototype, it had been generating a fatal error and stopping immediately. Make this a Warning instead of an Error and keep going.

Note that this can happen if the kernel-doc notation that is being parsed is not actually a function prototype; maybe it's a struct or something else, so I added "function" to the warning message to try to make it clearer that scripts/kernel-doc is looking for a function prototype here.

---
 scripts/kernel-doc |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
scripts/kernel-doc +1 -2
@@ -2125,8 +2125,7 @@ sub dump_function($$) {
 
 	create_parameterlist($args, ',', $file);
     } else {
-	print STDERR "Error(${file}:$.): cannot understand prototype: '$prototype'\n";
-	++$errors;
+	print STDERR "Warning(${file}:$.): cannot understand function prototype: '$prototype'\n";
 	return;
     }
 
#1 lore raw
Quoted 5 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

When scripts/kernel-doc cannot understand a function prototype, it had been generating a fatal error and stopping immediately. Make this a Warning instead of an Error and keep going.

Thanks!

#2 lore raw
In reply to Randy Dunlap
Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

When scripts/kernel-doc cannot understand a function prototype, it had been generating a fatal error and stopping immediately. Make this a Warning instead of an Error and keep going.

Quoted 8 lines

Note that this can happen if the kernel-doc notation that is being parsed is not actually a function prototype; maybe it's a struct or something else, so I added "function" to the warning message to try to make it clearer that scripts/kernel-doc is looking for a function prototype here.

Applied to kbuild.git#misc, thanks.

Michal