Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1493759pxb; Fri, 13 Nov 2020 14:24:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsRMsILWt+6WfFGOxqSMjsm38P5AciuGp3eZX1/KnOKSTTnqDRW+gm0Um9pnkKdUnaQyfr X-Received: by 2002:a17:906:77cc:: with SMTP id m12mr4073221ejn.139.1605306254279; Fri, 13 Nov 2020 14:24:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605306254; cv=none; d=google.com; s=arc-20160816; b=B3pV57odFUtjtAtdieW5Ryc5+gwj589/Y6HbL3qBMcJwZ6Vz7mQqRH/YP+dx7bsbv0 ivn52mdaoz8XMYFJOA8cEs3t5UmaT58OO8KJ5l0ZYxPSjE1UPbUxOipEZ+fAJBnPeVk2 JzRsBkhJtH8p++u4RHLZmkItR7cpW76KO3k787CQfG+8gIzT9gofM3NjKu8iGywjPLVk YuAfF0SYFm/CjAT843ERTYdhxSS89/OFyoGH+xg16shog5uP46pQrOZd39WrBy4fYW1O YTzGvqDJ6y9QMfT8i5MbERwz+Ki7GPKEmnMiTEtyFTdtia6x9gqX6GfauEZgS5jjAG/s czFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=Bi3+WKVR7l+omh8l1us8coFljotsrmafhHus1Wq899E=; b=QI+5dY/v4BJHmRSnnIfOXzmlOKYcEvTHlTUf//TADfsuXpoWH07mIj92b9QVFQeY65 Eda7i/gAQzd9qi4tThmmY/U3gHk+1R0Cg8gzymh7Hp9KjmwsRK7oa2p3OeFEEscTCiHb Bf/Kz0My59binbHzp3s7U1eN0lVhTuuTd3UoMIGmaggJkNkAsyeHoVgwRENP2nso8t0M Pw1VGVd218jkbBABR33QV51oIpQnIf/XoHzIraasM+a1QuI3UM94987LS+H3LG2JiytG 48cLAcGZ6b1asXBHvmLCG39Z4cGDvGZKJidEXEfcCmis8potYx3rLlzAose8iOSreRe4 E20g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u26si6713938ejc.249.2020.11.13.14.23.51; Fri, 13 Nov 2020 14:24:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726854AbgKMWVg (ORCPT + 99 others); Fri, 13 Nov 2020 17:21:36 -0500 Received: from ms.lwn.net ([45.79.88.28]:51034 "EHLO ms.lwn.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726830AbgKMWVJ (ORCPT ); Fri, 13 Nov 2020 17:21:09 -0500 Received: from lwn.net (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id 9C5EF734; Fri, 13 Nov 2020 22:21:07 +0000 (UTC) Date: Fri, 13 Nov 2020 15:21:06 -0700 From: Jonathan Corbet To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Eduardo Habkost Subject: Re: [PATCH 2/2] kernel-doc: Handle function typedefs without asterisks Message-ID: <20201113152106.7b4a07ee@lwn.net> In-Reply-To: <20201030144713.201372-3-pbonzini@redhat.com> References: <20201030144713.201372-1-pbonzini@redhat.com> <20201030144713.201372-3-pbonzini@redhat.com> Organization: LWN.net MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 30 Oct 2020 15:47:13 +0100 Paolo Bonzini wrote: > From: Eduardo Habkost > > Example of typedef that was not parsed by kernel-doc: > > typedef void (ObjectUnparent)(Object *obj); > > Signed-off-by: Eduardo Habkost > Signed-off-by: Paolo Bonzini So as you've undoubtedly noticed, reading those kernel-doc regexes is ... a wee bit on the painful side. Trying to compare two of them in a patch to figure out what you have done is even worse. I suspect we want these patches, but can you please supply a changelog that describes the change? > --- > scripts/kernel-doc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/kernel-doc b/scripts/kernel-doc > index 5b5caa7642f7..1a9c918aa653 100755 > --- a/scripts/kernel-doc > +++ b/scripts/kernel-doc > @@ -1302,7 +1302,7 @@ sub dump_typedef($$) { > $x =~ s@/\*.*?\*/@@gos; # strip comments. > > # Parse function prototypes > - if ($x =~ /typedef\s+(\w+\s*\**)\s*\(\*\s*(\w\S+)\s*\)\s*\((.*)\);/ || > + if ($x =~ /typedef\s+(\w+\s*\**)\s*\(\*?\s*(\w\S+)\s*\)\s*\((.*)\);/ || Here it appears that you are making the "*" before the function-pointer name optional, right? It really would help to say so in the changelog. This is true for the other patch as well. > $x =~ /typedef\s+(\w+\s*\**)\s*(\w\S+)\s*\s*\((.*)\);/) { > > # Function typedefs Thanks, jon