diff --git a/scripts/kernel-doc b/scripts/kernel-doc index c3a4854e5ee979acae0a3cec123e9ccb8b5706d4..c47eb31d604c4469a355cb10c121849581b6ded3 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1456,7 +1456,16 @@ sub create_parameterlist($$$) { if ($args[0] =~ m/\*/) { $args[0] =~ s/(\*+)\s*/ $1/; } - my @first_arg = split('\s+', shift @args); + + my @first_arg; + if ($args[0] =~ /^(.*\s+)(.*?\[.*\].*)$/) { + shift @args; + push(@first_arg, split('\s+', $1)); + push(@first_arg, $2); + } else { + @first_arg = split('\s+', shift @args); + } + unshift(@args, pop @first_arg); $type = join " ", @first_arg;