linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Cc: corbet@lwn.net
Subject: [PATCH 1/5] kernel-doc: cleanup parameter type in function-typed arguments
Date: Mon,  2 Jan 2017 16:22:23 +0100	[thread overview]
Message-ID: <20170102152227.9446-2-pbonzini@redhat.com> (raw)
In-Reply-To: <20170102152227.9446-1-pbonzini@redhat.com>

A prototype like

    /**
     * foo - sample definition
     * @bar: a parameter
     */
    int foo(int (*bar)(int x,
                       int y));

is currently producing

    .. c:function:: int foo (int (*bar) (int x,                    int y)

       sample definition

    **Parameters**

    ``int (*)(int x,                    int y) bar``
      a parameter

Collapse the spaces so that the output is nicer.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 scripts/kernel-doc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 030fc633acd4..c1ea91c2e497 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -2409,6 +2409,7 @@ sub push_parameter($$$) {
 	# "[blah" in a parameter string;
 	###$param =~ s/\s*//g;
 	push @parameterlist, $param;
+	$type =~ s/\s\s+/ /g;
 	$parametertypes{$param} = $type;
 }
 
-- 
2.9.3

  reply	other threads:[~2017-01-02 15:23 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 ` Paolo Bonzini [this message]
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 ` [PATCH 3/5] kernel-doc: include parameter type in docbook output Paolo Bonzini
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-2-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;
as well as URLs for NNTP newsgroup(s).