diff mbox series

[PULL,17/21] kernel-doc: Handle function typedefs without asterisks

Message ID 20201006220930.908275-18-ehabkost@redhat.com
State Superseded
Headers show
Series machine + QOM queue, 2020-10-06 | expand

Commit Message

Eduardo Habkost Oct. 6, 2020, 10:09 p.m. UTC
Example of typedef that was not parsed by kernel-doc:

  typedef void (ObjectUnparent)(Object *obj);

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201003024123.193840-3-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 scripts/kernel-doc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 57a4a72970..57b911ff17 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1318,7 +1318,7 @@  sub dump_typedef($$) {
     $x =~ s@/\*.*?\*/@@gos;	# strip comments.
 
     # Parse function prototypes
-    if ($x =~ /typedef\s+(\w+\s*\**)\s*\(\*\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