Skip to content

Commit

Permalink
kernel-doc: skip nested struct/union cleanly
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Randy Dunlap authored and Linus Torvalds committed Aug 5, 2008
1 parent d2dc1f4 commit 32ab8f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 32ab8f9

Please sign in to comment.