2008-08-03 20:38:28

by Randy Dunlap

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

From: Randy Dunlap <[email protected]>

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 <[email protected]>
---
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;