Skip to contentSkip to conversation

kernel-doc: allow unnamed bit-fields

PATCH In review Randy Dunlap 2 participants 2 messages May 16, 2008 – May 19, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-doc: allow unnamed bit-fields

From: Randy Dunlap <[email protected]>

Allow for unnamed bit-fields and skip them instead of printing an erroneous warning message for them, such as:

Warning(include/asm-s390/cio.h:103): No description found for parameter 'u32'

which contains:

struct tm_scsw {
	u32 :1;
---
 scripts/kernel-doc |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
scripts/kernel-doc +3 -1
@@ -1556,7 +1556,9 @@ sub create_parameterlist($$$) {
 		    push_parameter($2, "$type $1", $file);
 		}
 		elsif ($param =~ m/(.*?):(\d+)/) {
-		    push_parameter($1, "$type:$2", $file)
+		    if ($type ne "") { # skip unnamed bit-fields
+			push_parameter($1, "$type:$2", $file)
+		    }
 		}
 		else {
 		    push_parameter($param, $type, $file);
#1 lore raw
Quoted 5 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Allow for unnamed bit-fields and skip them instead of printing an erroneous warning message for them, such as:

Quoted 8 lines

Warning(include/asm-s390/cio.h:103): No description found for parameter 'u32'

which contains:

struct tm_scsw {
	u32 :1;

Added to kbuild-fixes.

Sam