Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9084832pxu; Mon, 28 Dec 2020 06:16:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxC7G4HTZAK8J5PzsYikRRXSd2wv7MwtLoP92WiAVJIRGbt4PTuB0qzgjH6hu1CbAchMivG X-Received: by 2002:a17:906:ce2b:: with SMTP id sd11mr42332456ejb.334.1609164960462; Mon, 28 Dec 2020 06:16:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164960; cv=none; d=google.com; s=arc-20160816; b=HuzhZkGZZxIJa2Hgu8WsT4tL5etPdMbSjM6tzvMIncoBww4xOWNPGotgWXEgViuV2X cxWFG9IT5zozNX0HXpLbgZUIKOkvY8+28pNMRH7/65LqTV8MTBm989gEAl/F40fKWRMu OcipnEleuB1Jxqcbz/Kwcz5z8Qx8aVjZyl+aJ3ErFJE7iUpISsas9RoGeScHwWkMjGJr OQstPyvngD/d7i6QJQaKCjhJ9++YH/ZtKGzsUKZs5XVXyo5tpdy4EFPsyGPmnnhsLRZ1 6cI0Yl7kFMYkWkoNeyZPLn+W0Oj7Ve9qoemF6GtMUj0sYvq9ETYAji0IFRWT7PRdtsQO QXkg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rbrgt1Xw7WvXmBEw81TvmQD+1OryPnjtUlzt63WZga0=; b=IPjpNtT1lMy1GfAh9FsWgN2wzEhHEu7GIX4p8zipQyjkS8hTnFDpAwtccmESNYJ4A1 DnP+fyJz9+0MPHB+psee6FGOdVVFhE498tyeJOjFGWXYk7uH+lt5RVspFUw3vlsP+STI OQ3cEE0bqBpyZg7zMS8vuZxbAa9yeKMLFNX49W1ga1LULcL6ZwfYM6BPMW/rmar64Y6G U+Eh4Di+oSgyxx4TSrc5k/58QqUf4uNP9V4Q9D469M5MoRutouNtJOp2Q992GcgIbWjN aVO3iZGwhrrraI7vM7cpo5pU3Fz7QdMvwoBe8AsvG/oDmp7O4tPeDHgf05jMJBShpEXC iuJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TTeI73Rb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g11si18719220ejc.500.2020.12.28.06.15.37; Mon, 28 Dec 2020 06:16:00 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TTeI73Rb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440232AbgL1ONk (ORCPT + 99 others); Mon, 28 Dec 2020 09:13:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:48494 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440210AbgL1ONf (ORCPT ); Mon, 28 Dec 2020 09:13:35 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C5A5922C97; Mon, 28 Dec 2020 14:12:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164774; bh=YluCWdZM4mCS8hD73LBm0Q/wuzWnO7VOYpz5c2pvBCQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TTeI73RbaYa0jra69MOjC3u5pWqLov+uBYxhNiiL9rNwXKDCNAcgYwJ1eEg+9+239 EogAKPoIcZxR9gUKoc89ueP8v1Z80+abQsMB1/WKflC2uajWRAJ5aOI70frXADNGJU PGQ2OyzSbYydwWdHS7JOEy7yh++l5ox72SIVcK+4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mauro Carvalho Chehab , Jonathan Corbet , Sasha Levin Subject: [PATCH 5.10 294/717] scripts: kernel-doc: fix parsing function-like typedefs Date: Mon, 28 Dec 2020 13:44:52 +0100 Message-Id: <20201228125035.111957081@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mauro Carvalho Chehab [ Upstream commit 7d2c6b1edf790d96e9017a0b27be2425e1af1532 ] Changeset 6b80975c6308 ("scripts: kernel-doc: fix typedef parsing") added support for things like: typedef unsigned long foo(); However, it caused a regression on this prototype: typedef bool v4l2_check_dv_timings_fnc(const struct v4l2_dv_timings *t, void *handle); This is only noticed after adding a patch that checks if the kernel-doc identifier matches the typedef: ./scripts/kernel-doc -none $(git grep '^.. kernel-doc::' Documentation/ |cut -d ' ' -f 3|sort|uniq) 2>&1|grep expecting include/media/v4l2-dv-timings.h:38: warning: expecting prototype for typedef v4l2_check_dv_timings_fnc. Prototype was for typedef nc instead The problem is that, with the new parsing logic, it is not checking for complete words at the type part. Fix it by adding a \b at the end of each type word at the regex. fixes: 6b80975c6308 ("scripts: kernel-doc: fix typedef parsing") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/218ff56dcb8e73755005d3fb64586eb1841a276b.1606896997.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet Signed-off-by: Sasha Levin --- scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 9b6ddeb097e93..6325bec3f66f8 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1431,7 +1431,7 @@ sub dump_enum($$) { } } -my $typedef_type = qr { ((?:\s+[\w\*]+){1,8})\s* }x; +my $typedef_type = qr { ((?:\s+[\w\*]+\b){1,8})\s* }x; my $typedef_ident = qr { \*?\s*(\w\S+)\s* }x; my $typedef_args = qr { \s*\((.*)\); }x; -- 2.27.0