Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp19092pxf; Tue, 9 Mar 2021 22:23:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwELj4rkOZ8Ee2XARHAY8ZTsge4JtxHwlrf+vi8fedYxbmwb+mb5OiUwQgQZHfxqnrrkqUE X-Received: by 2002:a17:906:30d9:: with SMTP id b25mr1902766ejb.348.1615357389162; Tue, 09 Mar 2021 22:23:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615357389; cv=none; d=google.com; s=arc-20160816; b=CYBmGPDDHwsofCDGmOgnjPlYnzn7PhYMw7LMd4DKoHqUUyMlOB+vHBh2OSEdpIB39n QVqj+fAanHj7mmAGIGCVNUtEmHJptyQUOiRaDt+F2JuMnQGY4DLrOmwFLNzuzmFPjqtu 11FBEn4vrjpTePYouDzmfJ4Qd1oFi6GwQBWwThHaW55u7OZA7wy+F5ZqXwWq1pnZA1FF XWDdwdoy+4ND3dyQpfrpeq8ci7ENw/7PBmLlhhQeFOCt8MW8ABRq42NBMtpTj948bZ+R WCNcXYPJiSguQ4e2IlDFExOKw27cj0SFAQUN3KxCWs2mjXrL0JZ3W+Ok+zCGNGfRTFCC VJBQ== 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=5p/SXRe4HjTxgctJ5m48amd8gNDg6K092/5QjLT6b4c=; b=MwNFOjjIgkl0s2OtaZwR/yhpK7TiYs1jKSvsdkaDE27Gkx/xG7K57rKyq1yQQtMic2 aRiGUm5tNnB6oq5BEYS9W6soia+ZIb1okBIdC1GRnlghurp6asyVP1MxRayuc46T83fy KECxsX6zN+vMs0tq8oVGIQdb4gL46xSWQvp7c9xv4RzCUYkMCkJs0rLyi6yuwv4R/UWC 6mCO2ZkVIyARyEfaRccmeNlH9Xnm8wWLFTr+bTMpI/h7Jk+GVuz2yucRIimxz2CFCh6n nF5HQ2IYWAo9FpW7lIny4Whpx8hLcNOzCAnkF9ZPe/t5oC4GNi7AiCYjGu+fwBzDk3tV OZMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=afTJ02CA; 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 h20si10322082edq.97.2021.03.09.22.22.38; Tue, 09 Mar 2021 22:23:09 -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=afTJ02CA; 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 S229543AbhCJGT6 (ORCPT + 99 others); Wed, 10 Mar 2021 01:19:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbhCJGTp (ORCPT ); Wed, 10 Mar 2021 01:19:45 -0500 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE588C06174A; Tue, 9 Mar 2021 22:19:44 -0800 (PST) Received: by mail-il1-x12d.google.com with SMTP id b5so14497463ilq.10; Tue, 09 Mar 2021 22:19:44 -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=5p/SXRe4HjTxgctJ5m48amd8gNDg6K092/5QjLT6b4c=; b=afTJ02CA0fyqSMV6hiFeYZ2votdnUzaUNActc9myS2kr7PuOKFpuyRsgQ2nGtNApqs L9Ml/Z7a0Q3KLYL7B5L7XzSDdEamBMaleMUOsUiWEj6kVzw8F8v4qV+DbL88tX/0dkKJ 2YfjTMGrLcDWKJVhfUvmUd/YdbhcOaD5exougRrwepHaQVM/in1TDfEsNpvlm3zA/Yq9 9SkrNVAUUQP++4zcG6YTmIh1r1r3iX3e1hjwWlME7L1fjUe0hCMQAA9RzGkm52PA4ZiS rin/UKxeK6XREnLXUjKiIptzYOtubAX3JHgLcZ/esMNcOi12MOz9PQ3ERZt3pkfy1lvO s9hQ== 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=5p/SXRe4HjTxgctJ5m48amd8gNDg6K092/5QjLT6b4c=; b=lQKKHUS6tAusa8Qi9qk+sEjn3ccBPBe4EGShJ2XUf9bMnB6pFK+VKaU6ZdIvdgbRuZ 6tApXmytk4xr11U1qfe2bO2B1kXAoeOFeXk/RCJe4iLuiBstW10l9YUG1Iw4ExiH5d4Y ObFPNZb3r8G7DZMufAWM+FXY6Sy1LotUw6RnFqRT/Yqc6LFn2q5rfA6mls59G7eUT11l caip/y1Y9yRpMRdZAoa+0rYjtq/Ueuv2Z6I4cXQTIyahozI2nnHOwVmqEtXWGjLJ4Jeo HQrhVil9kJ70BF+x0xS07b5kd/ZWn+4iaWa2iYuRHBixOLuXrtWCnBpbU487GZJ8w+aB Zw6A== X-Gm-Message-State: AOAM530JbqNsE924pU/N7nc80RKZn5gwOw6sUSMKCFXq/N68Hoh/Z+p3 UezVIKH13HBhU66x6A4XYOggAxi5wQu5Qjazyiw= X-Received: by 2002:a05:6e02:1aaa:: with SMTP id l10mr343415ilv.251.1615357184067; Tue, 09 Mar 2021 22:19:44 -0800 (PST) MIME-Version: 1.0 References: <20210309125324.4456-1-yashsri421@gmail.com> <8959bf29-9ee1-6a1d-da18-f440232864f3@darmarit.de> In-Reply-To: From: Lukas Bulwahn Date: Wed, 10 Mar 2021 07:19:41 +0100 Message-ID: Subject: Re: [RFC] scripts: kernel-doc: avoid warnings due to initial commented lines in file To: Aditya Cc: Markus Heiser , 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 Tue, Mar 9, 2021 at 10:24 PM Aditya wrote: > > On 9/3/21 7:00 pm, Markus Heiser wrote: > > > > Am 09.03.21 um 13:53 schrieb Aditya Srivastava: > >> Starting commented lines in a file mostly contains comments describing > >> license, copyright or general information about the file. > >> > >> E.g., in sound/pci/ctxfi/ctresource.c, initial comment lines describe > >> its copyright and other related file informations. > > > > The opening comment mark /** is used for kernel-doc comments [1] > > > > [1] > > https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html#how-to-format-kernel-doc-comments > > > > Hi Markus! > That's true. But the content inside the comment does not follow > kernel-doc format. > For e.g., try running kernel-doc -none/man/rst on the above file in > the example("sound/pci/ctxfi/ctresource.c"). > The starting 2-3 lines in files generally do not contain any > struct/enum/function, etc. declaration. > Aditya, can you provide a diff of the warnings over the whole kernel tree? At the moment, your patch just implements ignoring the initial comment, which probably is good for experimentation. Alternatively, we could simply have a dedicated warning and then ignore it or even warn and then parse it as-if. In the "long run", we would probably want to fix all current files in the repository by just replacing '/**' by '/*' and have kernel-doc warn about this suspicious pattern, when new files appear (maybe even configurable, but that is another feature to enable or disable certain kernel-doc checks and warnings). I would certainly assist and contribute to such a clean-up task. I think the first step is to look at the diff, and see how many cases really appear in the tree... then check how many patches throughout the whole tree are required and if they are generally accepted. Lukas