[PATCH] kernel-doc: skip nested struct/union cleanly

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Randy.Dunlap
Date: Sunday, August 3, 2008 - 1:38 pm

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

Fix handling of nested structs or unions.  The regex to strip (eliminate)
nested structs or unions was limited to only 0 or 1 matches.
This can cause an uneven number of left/right braces to be stripped,
which causes this:

Warning(linux-2.6.27-rc1-git2//include/net/mac80211.h:336): No description found for parameter '}'

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

--- lin2627-rc1g2-kerndocbrace.orig/scripts/kernel-doc
+++ lin2627-rc1g2-kerndocbrace/scripts/kernel-doc
@@ -1403,7 +1403,7 @@ sub dump_struct($$) {
 	my $members = $3;
 
 	# ignore embedded structs or unions
-	$members =~ s/{.*?}//g;
+	$members =~ s/{.*}//g;
 
 	# ignore members marked private:
 	$members =~ s/\/\*.*?private:.*?public:.*?\*\///gos;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] kernel-doc: skip nested struct/union cleanly, Randy.Dunlap, (Sun Aug 3, 1:38 pm)