提交 ada5f446 编写于 作者: G Gabriel Krisman Bertazi 提交者: Jonathan Corbet

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: NGabriel Krisman Bertazi <krisman@collabora.co.uk>
Fixes: c0d1b6ee ("kernel-doc: produce RestructuredText output")
Reviewed-by: NJani Nikula <jani.nikula@intel.com>
Signed-off-by: NJonathan Corbet <corbet@lwn.net>
上级 ff58fa7f
无相关合并请求
......@@ -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 "") {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部