Skip to content

Commit

Permalink
kernel-doc: cleanup parameter type in function-typed arguments
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
bonzini authored and Jonathan Corbet committed Jan 4, 2017
1 parent f2c1a05 commit 02a4f4f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 02a4f4f

Please sign in to comment.