kernel-doc: cleanup parameter type in function-typed arguments
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Jan 2017 15:22:23 +0000 (16:22 +0100)
committerJonathan Corbet <corbet@lwn.net>
Wed, 4 Jan 2017 22:07:23 +0000 (15:07 -0700)
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>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
scripts/kernel-doc

index 030fc633acd4ab11c7b12ff942601a820fe1fab8..c1ea91c2e497ce5abc0f73241a61044094d66723 100755 (executable)
@@ -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;
 }