diff options
| author | Jonathan Corbet <corbet@lwn.net> | 2016-08-26 09:14:08 -0400 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2016-09-06 10:02:19 -0400 |
| commit | ef00028b20481647431ca8bffe5469fb86cf154f (patch) | |
| tree | d5ce9fd8f4525b71761a41cbb97881aa05c315e3 /scripts/kernel-doc | |
| parent | 9d9cce7f10dc8d7a5fc6ef4e537e17664234605a (diff) | |
docs: make kernel-doc handle varargs properly
As far as I can tell, the handling of "..." arguments has never worked
right, so any documentation provided was ignored in favor of "variable
arguments." This makes kernel-doc handle "@...:" as documented. It does
*not* fix spots in kerneldoc comments that don't follow that convention,
but they are no more broken than before.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'scripts/kernel-doc')
| -rwxr-xr-x | scripts/kernel-doc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 301bf874cac8..c5918951a8d3 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
| @@ -412,7 +412,7 @@ my $doc_com_body = '\s*\* ?'; | |||
| 412 | my $doc_decl = $doc_com . '(\w+)'; | 412 | my $doc_decl = $doc_com . '(\w+)'; |
| 413 | # @params and a strictly limited set of supported section names | 413 | # @params and a strictly limited set of supported section names |
| 414 | my $doc_sect = $doc_com . | 414 | my $doc_sect = $doc_com . |
| 415 | '\s*(\@\w+|description|context|returns?|notes?|examples?)\s*:(.*)'; | 415 | '\s*(\@[.\w]+|\@\.\.\.|description|context|returns?|notes?|examples?)\s*:(.*)'; |
| 416 | my $doc_content = $doc_com_body . '(.*)'; | 416 | my $doc_content = $doc_com_body . '(.*)'; |
| 417 | my $doc_block = $doc_com . 'DOC:\s*(.*)?'; | 417 | my $doc_block = $doc_com . 'DOC:\s*(.*)?'; |
| 418 | my $doc_inline_start = '^\s*/\*\*\s*$'; | 418 | my $doc_inline_start = '^\s*/\*\*\s*$'; |
| @@ -2351,6 +2351,7 @@ sub push_parameter($$$) { | |||
| 2351 | 2351 | ||
| 2352 | if ($type eq "" && $param =~ /\.\.\.$/) | 2352 | if ($type eq "" && $param =~ /\.\.\.$/) |
| 2353 | { | 2353 | { |
| 2354 | $param = "..."; | ||
| 2354 | if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") { | 2355 | if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") { |
| 2355 | $parameterdescs{$param} = "variable arguments"; | 2356 | $parameterdescs{$param} = "variable arguments"; |
| 2356 | } | 2357 | } |
