public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Jonathan Corbet <corbet@lwn.net>, linux-doc@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@s-opensource.com>,
	Markus Heiser <markus.heiser@darmarit.de>
Subject: Re: [PATCH] docs: make kernel-doc handle varargs properly
Date: Sat, 27 Aug 2016 11:43:18 +0300	[thread overview]
Message-ID: <874m66d2l5.fsf@intel.com> (raw)
In-Reply-To: <20160826072544.2baadd47@lwn.net>

On Fri, 26 Aug 2016, Jonathan Corbet <corbet@lwn.net> wrote:
> 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*:(.*)';

So this will now accept "@foo.bar.baz:" too, right? Should it be
something like this instead?

'\s*(\@\w+|\@\.\.\.|description|context|returns?|notes?|examples?)\s*:(.*)';

BR,
Jani.


>  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";
>  	    }

-- 
Jani Nikula, Intel Open Source Technology Center

  parent reply	other threads:[~2016-08-27  8:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2016-09-06 13:36   ` Jonathan Corbet
2016-09-07  7:28     ` Markus Heiser
2016-09-07 13:08       ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874m66d2l5.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus.heiser@darmarit.de \
    --cc=mchehab@s-opensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox