All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs: make kernel-doc handle varargs properly
@ 2016-08-26 13:25 Jonathan Corbet
  2016-08-26 16:07 ` kbuild test robot
  2016-08-27  8:43 ` Jani Nikula
  0 siblings, 2 replies; 6+ messages in thread
From: Jonathan Corbet @ 2016-08-26 13:25 UTC (permalink / raw)
  To: linux-doc; +Cc: LKML, Mauro Carvalho Chehab, Markus Heiser, Jani Nikula

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>
---
 scripts/kernel-doc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index c681e8f0ecc2..e6c52ab938fd 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -414,7 +414,7 @@ my $doc_com_body = '\s*\* ?';
 my $doc_decl = $doc_com . '(\w+)';
 # @params and a strictly limited set of supported section names
 my $doc_sect = $doc_com . 
-    '\s*(\@\w+|description|context|returns?|notes?|examples?)\s*:(.*)';
+    '\s*(\@[.\w]+|description|context|returns?|notes?|examples?)\s*:(.*)';
 my $doc_content = $doc_com_body . '(.*)';
 my $doc_block = $doc_com . 'DOC:\s*(.*)?';
 my $doc_inline_start = '^\s*/\*\*\s*$';
@@ -2340,6 +2340,7 @@ sub push_parameter($$$) {
 
 	if ($type eq "" && $param =~ /\.\.\.$/)
 	{
+	    $param = "...";
 	    if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") {
 		$parameterdescs{$param} = "variable arguments";
 	    }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-09-07 13:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-26 13:25 [PATCH] docs: make kernel-doc handle varargs properly Jonathan Corbet
2016-08-26 16:07 ` kbuild test robot
2016-08-27  8:43 ` Jani Nikula
2016-09-06 13:36   ` Jonathan Corbet
2016-09-07  7:28     ` Markus Heiser
2016-09-07 13:08       ` Jani Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.