summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-10-08 20:21:44 +0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-10-10 15:29:05 +0200
commit3a80a766328fe73df5951639b5c9013ddba6efec (patch)
tree2054be48288e1ae320525c5e5231e9a77cb82602 /scripts
parent[media] demux.h: make checkpatch.ph happy (diff)
downloadlinux-3a80a766328fe73df5951639b5c9013ddba6efec.tar.xz
linux-3a80a766328fe73df5951639b5c9013ddba6efec.zip
kernel-doc: Add a parser for function typedefs
The current typedef parser only works for non-function typedefs. As we need to also document some function typedefs, add a parser for it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel-doc12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 9a08fb5c1af6..55ce47ffa02d 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1886,6 +1886,18 @@ sub dump_typedef($$) {
'purpose' => $declaration_purpose
});
}
+ elsif ($x =~ /typedef\s+\w+\s*\(\*\s*(\w\S+)\s*\)\s*\(/) { # functions
+ $declaration_name = $1;
+
+ output_declaration($declaration_name,
+ 'typedef',
+ {'typedef' => $declaration_name,
+ 'module' => $modulename,
+ 'sectionlist' => \@sectionlist,
+ 'sections' => \%sections,
+ 'purpose' => $declaration_purpose
+ });
+ }
else {
print STDERR "${file}:$.: error: Cannot parse typedef!\n";
++$errors;