Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1549248

[PATCH 1/5] kernel-doc: cleanup parameter type in function-typed arguments

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject [PATCH 1/5] kernel-doc: cleanup parameter type in function-typed arguments
Date 2017-01-02 16:30 +0100
Message-ID <sVcIF-jV-17@gated-at.bofh.it> (permalink)
References <sVcIF-jV-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 1/5] kernel-doc: cleanup parameter type in function-typed arguments Paolo Bonzini <pbonzini@redhat.com> - 2017-01-02 16:30 +0100

csiph-web