Skip to content

Commit ada5f44

Browse files
Gabriel Krisman BertaziJonathan Corbet
authored andcommitted
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: c0d1b6e ("kernel-doc: produce RestructuredText output") Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent ff58fa7 commit ada5f44

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/kernel-doc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1925,7 +1925,7 @@ sub output_function_rst(%) {
19251925
$lineprefix = " ";
19261926
foreach $parameter (@{$args{'parameterlist'}}) {
19271927
my $parameter_name = $parameter;
1928-
#$parameter_name =~ s/\[.*//;
1928+
$parameter_name =~ s/\[.*//;
19291929
$type = $args{'parametertypes'}{$parameter};
19301930

19311931
if ($type ne "") {

0 commit comments

Comments
 (0)