Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp160845pxb; Fri, 19 Feb 2021 22:32:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzlE5KsI3XaPpNXWZEzDsx9SHa85QQt3+zOgm5Ix7Nb44i0tBegKDjnqv3cDzceJWlhHwj6 X-Received: by 2002:a17:906:ad87:: with SMTP id la7mr8988195ejb.534.1613802748009; Fri, 19 Feb 2021 22:32:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613802748; cv=none; d=google.com; s=arc-20160816; b=emoCOf2/KQtV+OYsNOsYwCOhB7WqLRom51f7rMuqOGA4e/S7ieLyMquOenJq80RFR1 Vu1UmyEwb+Ce7SugCedB17NAHDxClMgV+7KxBmkyZ7+xt8ahpyRzYhlCfAbvzPxhy65C bcbiyKaHjcDo8wAGmm6BeUzsT1u8h+c4ov+VAoDjbSHJ0q4t68ME9/c2hzOt4STvwZ4J 0fe9eIIsIRH+StmB9GEtAYn4Uesqo3iwcSo2C16MMPb0qeG/g7z1x0ylgyZsU+92K7cA nvGX5nnpAcI6ZF753iGEbCLwDUHT6Q/ycOD3IjBDp6X8HUg3O+Xt/dklYELUr2vAw+th ipMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cbhfHHRIUaZy8yAJGu8fLFh9WOmxHPl60f50bXM7zwo=; b=ImWZ+BdlvXNJkWsPBQAIJMHLiofjLM7LRpbs42aAFMuyPjVOhvuHC+OUNWFdADSzbN 6wW6+XR+WHt2BOcg8H9kFirE3SKmsZzVcnXIvWqqniLCzS6ire+OK/rwIbXM+QjCxDag DRVGuMyMWOKG5y+Tec/7gJttkJjmE21d0hao4ovFx1qtm46SE9GygT/UQXS8UG85fTzn 4ltCrPv9I5EarcpWaI9QaPgHdoap9hOTOVzblG5vQT8h0APAAdLRjztEQ5P+eQ4RrI3N iwBKgMGoViG/0Aa6vt0FTI1FkSTWihuMc4IZQgfH4MxwWhmml9zuLhrC23zhaqV3ZyGq ELFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HRXdEKtv; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v12si1100593eja.361.2021.02.19.22.32.01; Fri, 19 Feb 2021 22:32:27 -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=@gmail.com header.s=20161025 header.b=HRXdEKtv; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229667AbhBTG2e (ORCPT + 99 others); Sat, 20 Feb 2021 01:28:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbhBTG2d (ORCPT ); Sat, 20 Feb 2021 01:28:33 -0500 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD640C061574; Fri, 19 Feb 2021 22:27:52 -0800 (PST) Received: by mail-io1-xd29.google.com with SMTP id u8so7966789ior.13; Fri, 19 Feb 2021 22:27:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cbhfHHRIUaZy8yAJGu8fLFh9WOmxHPl60f50bXM7zwo=; b=HRXdEKtvf9vgz47G1cFkpU6z5Ea5Es/FYQdYNgksGTbBybgWgmNmEkp4rUNyeQZCoF j6O3IUwc75w4wBH7Mh1bZt9eDpgg2aqGR6cesxUI0p9xbwSq/zffQ8GHbt2PuYoJrk6I W7yvIBxQ3dSb7b1UItfnH1RnIHgJZDWLvBXP30LSV+PFE8SGhHTTyCS+JISfl4fC/79b EV3286239qCeESz+SfqysFOcyp5r7GCJw1NOaS/cl0qQnsmI/MoScMoTyO6SqpgiQLmT rscaBLSg2JhOjzaTEn4t++VDAds0L0ho3+jeNtiVleoC8BVL+AmKMc/vp6GCrX+urqBl PPVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cbhfHHRIUaZy8yAJGu8fLFh9WOmxHPl60f50bXM7zwo=; b=Zw2q+ts/WTKJWA55LWuuoxssoF1Uj9iocuCKi1a8LTyh3x0z8uVRQadnOWCwmhNL1a a+0D9WCxrtQMECoX1kJeQWFWh2cGJotZoLPI9/rOQ4IgCYdyCCbJ2WOTcO5yu1FJNA3c GR1CY/8OMoGovSfZu7xMaio2PlmKf6riz/aj1TFl8w+0I6DigL0sUSLS1ApHiSbMuV8C 6Jy4vkNXhdgylUo6A7iOlBFPq6nBH3LawW912BSXzv1MJFFr8UPPR/qbqGiZSBTImp+i eoCa3VJCTCd4yRPaHa3mi0ayuryhc6Hb8A/k990eXNd74gTQTO3vm4P7W/xky0DP4aTC KGLg== X-Gm-Message-State: AOAM533FJ025fLmsCA4U9vokFzgyJy5lPB/ctt+l+43bAAbHmAQiPRBt H3h9qhDcZeuk4Pd6Aw3vHNCkM0kD6RnrLQkzB8w= X-Received: by 2002:a5e:8f49:: with SMTP id x9mr7220367iop.189.1613802472221; Fri, 19 Feb 2021 22:27:52 -0800 (PST) MIME-Version: 1.0 References: <20210217145625.14006-1-yashsri421@gmail.com> In-Reply-To: <20210217145625.14006-1-yashsri421@gmail.com> From: Lukas Bulwahn Date: Sat, 20 Feb 2021 07:27:41 +0100 Message-ID: Subject: Re: [RFC] scripts: kernel-doc: fix array element capture in pointer-to-func parsing To: Aditya Srivastava Cc: Jonathan Corbet , linux-kernel-mentees@lists.linuxfoundation.org, Linux Kernel Mailing List , "open list:DOCUMENTATION" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 17, 2021 at 3:56 PM Aditya Srivastava wrote: > > Currently, kernel-doc causes an unexpected error when array element (i.e., > "type (*foo[bar])(args)") is present as pointer parameter in > pointer-to-function parsing. > > For e.g., running kernel-doc -none on kernel/gcov/gcc_4_7.c causes this > error: > "Use of uninitialized value $param in regexp compilation at ...", in > combination with: > "warning: Function parameter or member '' not described in 'gcov_info'" > > Here, the parameter parsing does not take into account the presence of > array element (i.e. square brackets) in $param. > > Provide a simple fix by adding square brackets in the regex, responsible > for capturing $param. > > A quick evaluation, by running 'kernel-doc -none' on entire kernel-tree, > reveals that no additional warning or error has been added or removed by > the fix. > > Suggested-by: Lukas Bulwahn > Signed-off-by: Aditya Srivastava > --- > * Applies perfectly over next-20210217 > Aditya, Jonathan, I have tested this change with: git ls-files | xargs ./scripts/kernel-doc -none 2>&1 | tee kernel-doc-output Applied the patch, and re-ran that command and compared the diff. First, I observed that ./scripts/kernel-doc is not fully deterministic on my machine, although I could not really pinpoint it to the exact reason where that comes in. Secondly, more importantly, the relevant diff affected by this patch is: < Use of uninitialized value $param in regexp compilation at ./scripts/kernel-doc line 1559, line 308. < Use of uninitialized value $actual in substitution (s///) at ./scripts/kernel-doc line 1523, line 308. < Use of uninitialized value $actual in substitution (s///) at ./scripts/kernel-doc line 1523, line 308. < Use of uninitialized value $param in substitution (s///) at ./scripts/kernel-doc line 1617, line 308. < Use of uninitialized value $param in hash element at ./scripts/kernel-doc line 1651, line 308. < Use of uninitialized value $param in pattern match (m//) at ./scripts/kernel-doc line 1651, line 308. < Use of uninitialized value $param in hash element at ./scripts/kernel-doc line 1652, line 308. < Use of uninitialized value $param in pattern match (m//) at ./scripts/kernel-doc line 1654, line 308. < Use of uninitialized value $param in concatenation (.) or string at ./scripts/kernel-doc line 1655, line 308. < drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h:308: warning: Function parameter or member '' not described in 'brcmf_fweh_info' < Use of uninitialized value $param in hash element at ./scripts/kernel-doc line 1672, line 308. < Use of uninitialized value $param in regexp compilation at ./scripts/kernel-doc line 1559, line 96. < Use of uninitialized value $actual in substitution (s///) at ./scripts/kernel-doc line 1523, line 96. < Use of uninitialized value $actual in substitution (s///) at ./scripts/kernel-doc line 1523, line 96. < Use of uninitialized value $param in substitution (s///) at ./scripts/kernel-doc line 1617, line 96. < Use of uninitialized value $param in hash element at ./scripts/kernel-doc line 1651, line 96. < Use of uninitialized value $param in pattern match (m//) at ./scripts/kernel-doc line 1651, line 96. < Use of uninitialized value $param in hash element at ./scripts/kernel-doc line 1652, line 96. < Use of uninitialized value $param in pattern match (m//) at ./scripts/kernel-doc line 1654, line 96. < Use of uninitialized value $param in concatenation (.) or string at ./scripts/kernel-doc line 1655, line 96. < kernel/gcov/gcc_4_7.c:96: warning: Function parameter or member '' not described in 'gcov_info' < Use of uninitialized value $param in hash element at ./scripts/kernel-doc line 1672, line 96. So, I can confirm that the mentioned issue is really resolved with this patch, and that deserves a tag: Tested-by: Lukas Bulwahn Thanks, Aditya. When can we expect the next patch for ./scripts/kernel-doc? Looking forward to running the next test :) Lukas