From: Mauro Carvalho Chehab Date: Thu, 8 Oct 2015 18:21:44 +0000 (-0300) Subject: kernel-doc: Add a parser for function typedefs X-Git-Tag: firefly_0821_release~176^2~795^2~36 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3a80a766328fe73df5951639b5c9013ddba6efec;p=firefly-linux-kernel-4.4.55.git 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 --- 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;