docs: kernel-doc: fix parsing of arrays
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 29 Mar 2018 14:58:59 +0000 (10:58 -0400)
committerJonathan Corbet <corbet@lwn.net>
Thu, 29 Mar 2018 21:27:42 +0000 (15:27 -0600)
The logic with parses array has a bug that prevents it to
parse arrays like:
struct {
...
struct {
u64 msdu[IEEE80211_NUM_TIDS + 1];
...
...

Fix the parser to accept it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
scripts/kernel-doc

index eb986a7809d3f636ccb65607c6e4200f2aae2c81..0057d8eafcc10cf922d81264e39c55002b8fc545 100755 (executable)
@@ -1120,7 +1120,7 @@ sub dump_struct($$) {
                                        # Handle bitmaps
                                        $arg =~ s/:\s*\d+\s*//g;
                                        # Handle arrays
-                                       $arg =~ s/\[\S+\]//g;
+                                       $arg =~ s/\[.*\]//g;
                                        # The type may have multiple words,
                                        # and multiple IDs can be defined, like:
                                        #       const struct foo, *bar, foobar