Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp331084pxb; Thu, 25 Feb 2021 03:54:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+X6KAwb7aLnw4ZudocKU3CvAARm73m+WQYHxuDe0/ab9U2ny81j6BhB+F4pqM2BYluPR/ X-Received: by 2002:a05:6402:686:: with SMTP id f6mr2462786edy.125.1614254057062; Thu, 25 Feb 2021 03:54:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614254057; cv=none; d=google.com; s=arc-20160816; b=AWhPVaI0x7Eyu9rahQBNEopyZCdVYlN52ASJPP48RoKYi91qk4Le1zPcD2kWCdGxMu V5N/eutvOuJa5ccU3vzwNATihnWMy69bC/DQojs2Tq9C0F+isfvEcHutwzYZQ5DaMVmf urRc2Jgib0Z+2ncYfVqA08eDqQbrOaIPuPH+SfxQ7iWbmabLparuWu2PHlRqVTC0XX6q Ldp5wPSvvv9diE3xfqJpCNkcc73P8HztQ2VT9gHgSI4V5IAxiZ5RdMlQ/huDjPXGYjc/ X6dSFfqQhU3vYWxLd8B6SNh6kpEp4VvwqncGv4cjJWMb22uXF1JNXjxufxLlifLJe5g3 y4YQ== 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=p3L7usN+5cmsXeKGLPgVIQPUIqxaAXKtFSZCm0zZ0Hk=; b=HRO6SpS1Ce9PxeOLVbni0U3CNb/WZcp3T9NmYB75l5smQ7dyY+WMtAyMflSCiIg/6D 2aM+MotpR7To8hZBPF6F5unjnbSGKDpLhfGEjnvkWsEUffrPpGfLOgV6z46RN8kdYSlc GtIHncQfzlznPrkSDZDvocZSzfmyfI5NmFEzZpqS22RXrn+Rh01S63yOiH0RWxnvBz5H DE1ymK7G07DaVK44pTP5VdrMerIIu94V35m1ResCoezFsGO9i3JKGhcesuT5j4wDnMTG vMErYqJnbrrQwuXUoRX47ODSI5JuxgY2vagV37ngyD+LTdgT+rPjp5oxp/PW1Z5AQ76R NRwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oBf6vlDm; 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 h12si3025151eds.283.2021.02.25.03.53.55; Thu, 25 Feb 2021 03:54:17 -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=oBf6vlDm; 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 S233248AbhBYLsy (ORCPT + 99 others); Thu, 25 Feb 2021 06:48:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229886AbhBYLsw (ORCPT ); Thu, 25 Feb 2021 06:48:52 -0500 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F0D6C061756; Thu, 25 Feb 2021 03:48:12 -0800 (PST) Received: by mail-io1-xd36.google.com with SMTP id a7so5499176iok.12; Thu, 25 Feb 2021 03:48:12 -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=p3L7usN+5cmsXeKGLPgVIQPUIqxaAXKtFSZCm0zZ0Hk=; b=oBf6vlDmlJBTEeO9ygLoHlDgg7UVVuSXuYc28Nfjg9q3yy/TtXuxWvEJadtVpbFh5a tAvKfmgZWO3/LL4wKLwoNl3XrJLB37efdjaupMxFg1k5Ml3I5OutcnzyMrO+MV/GBDNb IKSz5lN4anDRqaG99BrmoKRBE0xfPRdOBVuhZ+C6QxKJvbLLRCpbvG6YRvqIAhpk3Z3v kyIIHSwXAMFOp8pKoI5Lpz5NY2Vk/WQvtVWs8Yt1QzSdotjyPRIswtg+2z3RiOPlf1EX XeKwg9J41LWqHHn/f57g74uR4zXAvZxF3xI4oBcZnDGZtCa2+oQyk6Ur0X5ziG6wRKbV PJtA== 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=p3L7usN+5cmsXeKGLPgVIQPUIqxaAXKtFSZCm0zZ0Hk=; b=K3Mv81viEFVC1VHOoWpHaGZ4kjd0egCFhVMzAwWYKnEgQM6VdRXe/+LGm5EVhFgUuV jZAe02phsO7Qwl5B6nKVdk2GLzCfWq8vG/0bFX8d3d8dGwgl1xkCnNSP2swQTNRMpuEj 6MUcVjwMq9Z6JzhzOWyhiRs5QSyZwaBdOihYfeM9H2eDvyM3z3b6BAhBYr2F7rNcUk+B mIFkt1mLH3ar4m171XGE3H9aN1LkzqS+phAE5WnTBCPFx6GxAMqXuD7hUMTNjU7yKkx0 VnIDj7H3AwM8fc6CJN77ebbbsAf3whQyR8zhHRXaFK7+zsywVHtlD528WKH5Y0Oab5dL w+mg== X-Gm-Message-State: AOAM5329slfm7u4cv0GPnwemUDWO3v0J6QzWfydFA6I+zx4ueEHkVICE hg/JKBY41wzT6VjGwCz0xaBTOcxTRmOyTmV2ShTfb6g98gKJYw== X-Received: by 2002:a6b:b452:: with SMTP id d79mr2218002iof.183.1614253691517; Thu, 25 Feb 2021 03:48:11 -0800 (PST) MIME-Version: 1.0 References: <875z2jlr2j.fsf@meer.lwn.net> <20210224133002.13503-1-yashsri421@gmail.com> In-Reply-To: <20210224133002.13503-1-yashsri421@gmail.com> From: Lukas Bulwahn Date: Thu, 25 Feb 2021 12:48:00 +0100 Message-ID: Subject: Re: [RFC v2] scripts: kernel-doc: fix typedef support for struct/union parsing To: Aditya Srivastava Cc: Jonathan Corbet , "open list:DOCUMENTATION" , Linux Kernel Mailing List , linux-kernel-mentees@lists.linuxfoundation.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 24, 2021 at 2:30 PM Aditya Srivastava wrote: > > Currently, there are 447 files in the kernel tree, which use 'typedef > struct/union' syntax for defining some struct/union. In total, there > are ~1290 such occurrences in the kernel tree. > > However, kernel-doc does not support it currently, and running > scripts/kernel-doc -none on emits: > "error: Cannot parse struct or union!" > I will help rephrasing it more precisely: Currently, there are ~1290 occurrences in 447 files in the kernel tree 'typedef struct/union' syntax for defining some struct/union. However, kernel-doc currently does not support that syntax. Of the ~1290 occurrences, there are four occurrences in ./include/linux/zstd.h with typedef struct/union syntax and a preceding kernel-doc; all other occurrences have no preceding kernel-doc. Add support for parsing struct/union following this syntax. I also tested it; here is my quick diff of "git ls-files | xargs ./scripts/kernel-doc -none 2>&1" before and after patch application: < include/linux/zstd.h:154: error: Cannot parse struct or union! < include/linux/zstd.h:171: error: Cannot parse struct or union! < include/linux/zstd.h:181: error: Cannot parse struct or union! 18857d18853 < include/linux/zstd.h:936: error: Cannot parse struct or union! So, again: Tested-by: Lukas Bulwahn Aditya, can you please pick up my rephrasing and send out a v3. Lukas