From: Gabriel Krisman Bertazi Date: Mon, 9 Jan 2017 20:11:57 +0000 (-0200) Subject: kernel-doc: properly document array arguments of function X-Git-Tag: v4.11-rc1~108^2~29 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=ada5f446bbe504ddf5a374cae65b39108db86867;p=linux.git 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 Fixes: c0d1b6ee780a ("kernel-doc: produce RestructuredText output") Reviewed-by: Jani Nikula Signed-off-by: Jonathan Corbet --- 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(%) { $lineprefix = " "; foreach $parameter (@{$args{'parameterlist'}}) { my $parameter_name = $parameter; - #$parameter_name =~ s/\[.*//; + $parameter_name =~ s/\[.*//; $type = $args{'parametertypes'}{$parameter}; if ($type ne "") {