diff options
author | Gabriel Krisman Bertazi <krisman@collabora.co.uk> | 2017-01-09 15:11:57 -0500 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2017-01-13 12:53:24 -0500 |
commit | ada5f446bbe504ddf5a374cae65b39108db86867 (patch) | |
tree | 2bc4c134cdccbe4231530a268d7f9fc4b036a51d /scripts/kernel-doc | |
parent | ff58fa7f556c1d87061e4a91ed875d5f8aa9571f (diff) |
kernel-doc: properly document array arguments of function
Documentation for array parameters passed in a function, like the first
argument in the function below, weren't getting exported in the rst
format, although they work fine for html and pdf formats:
void drm_clflush_pages(struct page * pages[], unsigned long num_pages)
That's because the string key to store the description in the
parameterdescs dictionary doesn't have the [] suffix. This cleans up
the suffix from the key before accessing the dictionary.
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Fixes: c0d1b6ee780a ("kernel-doc: produce RestructuredText output")
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-x | scripts/kernel-doc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 4c9ada36fe6b..03875d788ea8 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -1925,7 +1925,7 @@ sub output_function_rst(%) { | |||
1925 | $lineprefix = " "; | 1925 | $lineprefix = " "; |
1926 | foreach $parameter (@{$args{'parameterlist'}}) { | 1926 | foreach $parameter (@{$args{'parameterlist'}}) { |
1927 | my $parameter_name = $parameter; | 1927 | my $parameter_name = $parameter; |
1928 | #$parameter_name =~ s/\[.*//; | 1928 | $parameter_name =~ s/\[.*//; |
1929 | $type = $args{'parametertypes'}{$parameter}; | 1929 | $type = $args{'parametertypes'}{$parameter}; |
1930 | 1930 | ||
1931 | if ($type ne "") { | 1931 | if ($type ne "") { |