Commit 2e15f540 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] trivial: scripts_kernel-doc: ignoring embedded structs shouldn't be

From:  <adobriyan@mail.ru>

Imagine you have a code similar to

  struct foo {
  	union {
  		struct tcphdr   *th;
  	} h;
  	union {
  		struct iphdr    *iph;
  	} nh;
  };

kernel-doc in it's current state will happily eat everything from first '{' to
last '}' and nobody will see parameter 'h' in documentation (look at
include/linux/skbuff.h:struct sk_buff for real world example).

So, fix the greedy regexp.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c1a20245
...@@ -1206,7 +1206,7 @@ sub dump_struct($$) { ...@@ -1206,7 +1206,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;
create_parameterlist($members, ';', $file); create_parameterlist($members, ';', $file);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment