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

From: Randy.Dunlap
Date: Sun Aug 03 2008 - 16:38:30 EST


From: Randy Dunlap <randy.dunlap@xxxxxxxxxx>

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@xxxxxxxxxx>
---
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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/