From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757453AbcIGNJA (ORCPT ); Wed, 7 Sep 2016 09:09:00 -0400 Received: from mga04.intel.com ([192.55.52.120]:2875 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757224AbcIGNI4 (ORCPT ); Wed, 7 Sep 2016 09:08:56 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,296,1470726000"; d="scan'208";a="1052574143" From: Jani Nikula To: Markus Heiser , Jonathan Corbet Cc: linux-doc@vger.kernel.org, LKML , Mauro Carvalho Chehab Subject: Re: [PATCH] docs: make kernel-doc handle varargs properly In-Reply-To: <5E6AEE3A-0B34-455D-89AE-AF0F9D0C636B@darmarit.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20160826072544.2baadd47@lwn.net> <874m66d2l5.fsf@intel.com> <20160906073616.409f7be0@lwn.net> <5E6AEE3A-0B34-455D-89AE-AF0F9D0C636B@darmarit.de> User-Agent: Notmuch/0.22.1+63~g648dcc7 (https://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Wed, 07 Sep 2016 16:08:53 +0300 Message-ID: <87r38vx3fe.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 07 Sep 2016, Markus Heiser wrote: > Am 06.09.2016 um 15:36 schrieb Jonathan Corbet : > >> 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... > > Feel free to contact me if you want to see a RFC. > > OT but BTW: Does sparse parse macros, or did sparse precompile? I mean, > are macros objects of sparse's AST or does the AST only contain > C objects? Sparse contains a C preprocessor. > Sorry if my question is dump, I haven't had time to take a serious > look on sparse. See https://lwn.net/Articles/689907/. BR, Jani. -- Jani Nikula, Intel Open Source Technology Center