浏览代码

kernel-doc: skip nested struct/union cleanly

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>
Randy Dunlap 16 年之前
父节点
当前提交
32ab8f97dd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scripts/kernel-doc

+ 1 - 1
scripts/kernel-doc

@@ -1403,7 +1403,7 @@ sub dump_struct($$) {
 	my $members = $3;
 	my $members = $3;
 
 
 	# ignore embedded structs or unions
 	# ignore embedded structs or unions
-	$members =~ s/{.*?}//g;
+	$members =~ s/{.*}//g;
 
 
 	# ignore members marked private:
 	# ignore members marked private:
 	$members =~ s/\/\*.*?private:.*?public:.*?\*\///gos;
 	$members =~ s/\/\*.*?private:.*?public:.*?\*\///gos;