aboutsummaryrefslogtreecommitdiff
path: root/scripts/kernel-doc
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-xscripts/kernel-doc16
1 files changed, 3 insertions, 13 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 40ad782..0ff62bb 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1064,14 +1064,6 @@ sub output_blockhead {
sub dump_declaration($$) {
no strict 'refs';
my ($prototype, $file) = @_;
- if ($decl_type eq 'type name') {
- if ($prototype =~ /^(enum|struct|union)\s+/) {
- $decl_type = $1;
- } else {
- return;
- }
- }
-
my $func = "dump_" . $decl_type;
&$func(@_);
}
@@ -1318,8 +1310,8 @@ sub dump_typedef($$) {
$x =~ s@/\*.*?\*/@@gos; # strip comments.
# Parse function prototypes
- if ($x =~ /typedef\s+(\w+)\s*\(\*\s*(\w\S+)\s*\)\s*\((.*)\);/ ||
- $x =~ /typedef\s+(\w+)\s*(\w\S+)\s*\s*\((.*)\);/) {
+ if ($x =~ /typedef\s+(\w+\s*\**)\s*\(\*?\s*(\w\S+)\s*\)\s*\((.*)\);/ ||
+ $x =~ /typedef\s+(\w+\s*\**)\s*(\w\S+)\s*\s*\((.*)\);/) {
# Function typedefs
$return_type = $1;
@@ -1928,9 +1920,7 @@ sub process_name($$) {
++$warnings;
}
- if ($identifier =~ m/^[A-Z]/) {
- $decl_type = 'type name';
- } elsif ($identifier =~ m/^struct\b/) {
+ if ($identifier =~ m/^struct\b/) {
$decl_type = 'struct';
} elsif ($identifier =~ m/^union\b/) {
$decl_type = 'union';