From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, corbet@lwn.net
Cc: Eduardo Habkost <ehabkost@redhat.com>
Subject: [PATCH 2/2] kernel-doc: Handle function typedefs without asterisks
Date: Fri, 30 Oct 2020 15:47:13 +0100 [thread overview]
Message-ID: <20201030144713.201372-3-pbonzini@redhat.com> (raw)
In-Reply-To: <20201030144713.201372-1-pbonzini@redhat.com>
From: Eduardo Habkost <ehabkost@redhat.com>
Example of typedef that was not parsed by kernel-doc:
typedef void (ObjectUnparent)(Object *obj);
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
scripts/kernel-doc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 5b5caa7642f7..1a9c918aa653 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1302,7 +1302,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
--
2.28.0
next prev parent reply other threads:[~2020-10-30 14:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 14:47 [PATCH 0/2] kernel-doc: Handle function typedefs Paolo Bonzini
2020-10-30 14:47 ` [PATCH 1/2] kernel-doc: Handle function typedefs that return pointers Paolo Bonzini
2020-10-30 14:47 ` Paolo Bonzini [this message]
2020-11-13 22:21 ` [PATCH 2/2] kernel-doc: Handle function typedefs without asterisks Jonathan Corbet
2020-11-13 22:35 ` Paolo Bonzini
2020-11-13 22:39 ` Matthew Wilcox
2020-11-17 21:24 ` Eduardo Habkost
2020-11-17 21:30 ` Matthew Wilcox
2020-11-17 22:36 ` [RFC] Add kernel-doc test script Eduardo Habkost
2020-11-18 0:23 ` Randy Dunlap
2020-11-18 13:03 ` Eduardo Habkost
2020-11-18 16:32 ` Randy Dunlap
2020-11-18 16:57 ` Eduardo Habkost
2020-11-18 16:58 ` Randy Dunlap
2020-11-18 8:21 ` Paolo Bonzini
2020-11-18 12:05 ` Eduardo Habkost
2020-11-18 16:27 ` Jonathan Corbet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201030144713.201372-3-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=corbet@lwn.net \
--cc=ehabkost@redhat.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).