From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Cc: corbet@lwn.net
Subject: [PATCH 3/5] kernel-doc: include parameter type in docbook output
Date: Mon, 2 Jan 2017 16:22:25 +0100 [thread overview]
Message-ID: <20170102152227.9446-4-pbonzini@redhat.com> (raw)
In-Reply-To: <20170102152227.9446-1-pbonzini@redhat.com>
The restructuredText output includes both the parameter type and
the name for functions and function-typed members. Do the same
for docbook.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
scripts/kernel-doc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 265ea16cbe22..e5b5daa147ea 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1131,8 +1131,9 @@ sub output_function_xml(%) {
foreach $parameter (@{$args{'parameterlist'}}) {
my $parameter_name = $parameter;
$parameter_name =~ s/\[.*//;
+ $type = $args{'parametertypes'}{$parameter};
- print " <varlistentry>\n <term><parameter>$parameter</parameter></term>\n";
+ print " <varlistentry>\n <term><parameter>$type $parameter</parameter></term>\n";
print " <listitem>\n <para>\n";
$lineprefix=" ";
output_highlight($args{'parameterdescs'}{$parameter_name});
@@ -1223,8 +1224,9 @@ sub output_struct_xml(%) {
defined($args{'parameterdescs'}{$parameter_name}) || next;
($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
+ $type = $args{'parametertypes'}{$parameter};
print " <varlistentry>";
- print " <term>$parameter</term>\n";
+ print " <term><literal>$type $parameter</literal></term>\n";
print " <listitem><para>\n";
output_highlight($args{'parameterdescs'}{$parameter_name});
print " </para></listitem>\n";
--
2.9.3
next prev parent reply other threads:[~2017-01-02 15:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-02 15:22 [PATCH 0/5] kernel-doc tweaks and cleanup of rST vs. non-rST backends Paolo Bonzini
2017-01-02 15:22 ` [PATCH 1/5] kernel-doc: cleanup parameter type in function-typed arguments Paolo Bonzini
2017-01-02 15:22 ` [PATCH 2/5] kernel-doc: strip attributes even if they have an argument Paolo Bonzini
2017-01-02 15:22 ` Paolo Bonzini [this message]
2017-01-02 15:22 ` [PATCH 4/5] kernel-doc: make member highlighting available in all backends Paolo Bonzini
2017-01-02 15:22 ` [PATCH 5/5] kernel-doc: make highlights more homogenous for the various backends Paolo Bonzini
2017-01-03 9:57 ` [PATCH 0/5] kernel-doc tweaks and cleanup of rST vs. non-rST backends Jani Nikula
2017-01-04 15:13 ` Paolo Bonzini
2017-01-04 15:40 ` Jani Nikula
2017-01-04 22:06 ` Jonathan Corbet
2017-01-23 13:42 ` Markus Heiser
2017-01-23 13:58 ` Paolo Bonzini
2017-01-23 14:38 ` Markus Heiser
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=20170102152227.9446-4-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=corbet@lwn.net \
--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
Powered by JetHome