[PATCH] kernel-doc: allow unnamed bit-fields

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: lkml <linux-kernel@...>
Cc: akpm <akpm@...>, samr <sam@...>
Date: Friday, May 16, 2008 - 6:45 pm

From: Randy Dunlap <randy.dunlap@oracle.com>

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;

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 scripts/kernel-doc |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- next-20080516.orig/scripts/kernel-doc
+++ next-20080516/scripts/kernel-doc
@@ -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);
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] kernel-doc: allow unnamed bit-fields, Randy Dunlap, (Fri May 16, 6:45 pm)
Re: [PATCH] kernel-doc: allow unnamed bit-fields, Sam Ravnborg, (Mon May 19, 2:12 pm)