From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933602AbcIFNgZ (ORCPT ); Tue, 6 Sep 2016 09:36:25 -0400 Received: from tex.lwn.net ([70.33.254.29]:57609 "EHLO vena.lwn.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751258AbcIFNgX (ORCPT ); Tue, 6 Sep 2016 09:36:23 -0400 Date: Tue, 6 Sep 2016 07:36:16 -0600 From: Jonathan Corbet To: Jani Nikula Cc: linux-doc@vger.kernel.org, LKML , Mauro Carvalho Chehab , Markus Heiser Subject: Re: [PATCH] docs: make kernel-doc handle varargs properly Message-ID: <20160906073616.409f7be0@lwn.net> In-Reply-To: <874m66d2l5.fsf@intel.com> References: <20160826072544.2baadd47@lwn.net> <874m66d2l5.fsf@intel.com> Organization: LWN.net X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 27 Aug 2016 11:43:18 +0300 Jani Nikula wrote: > On Fri, 26 Aug 2016, Jonathan Corbet 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 > > --- > > 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*:(.*)'; That works too. I had a sort of vision of catching the "args..." notation that a lot of kerneldoc comments use and doing the right thing, but ran out of patience before getting it to work. There are times when I find Markus's python kernel-doc replacement tempting... Maybe I'll beat my head against that wall one more time when I get a chance and, failing that, just use the above. Thanks, jon