Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp717362pxf; Thu, 11 Mar 2021 13:07:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJz13ikVNoMX1fHbHrlc0V3NvkaGqJO+676gl94ENQ+qdf0lUjLfPAA/GU3oYdRDOld7mFkl X-Received: by 2002:a05:6402:13ce:: with SMTP id a14mr10616370edx.365.1615496872573; Thu, 11 Mar 2021 13:07:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615496872; cv=none; d=google.com; s=arc-20160816; b=pwBHUu3S+vFUjc23nmJ5AocLAsO6dRT93sxABjeSOLNmu+fcCey93H2p6zjEF9CwLJ OVhwVOI3FlO2i2p9ZWjVYCuQLSU5puIpVAxQhDg61LUzIXyM2SA5CerSRq8fVyeX+jzU lpb6gT0ThSQwiVT/D0LXLd80mLD33nbyGCv3sLpwE31B1KcjMNqJOs2xzSzqW+TufJSh lwleOUUswHerPhhdEzedo1kWa894aYGt4tKC5VmlMOpL9mUpIN7A3sE+vlIf+fwIGAwN m8E9lu0LUH5HGJIceLSK+egcNZ6fIi12cYfTqPy95n/MUQhZgFQNPz6vuSbmQ01Mqyg5 FvsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=ALluUOsoSqK4P+is/Y65pRMrQ+pvKVSisjX8vHlvv0Y=; b=d1ISuilym0PUJ0GLBcwPsXuD4Wlxl2RZ84tsKgfn3e/6ioxy+6jkXtPDF6HlcDGkel hMgKJQ1fYxXW9Y6hiCHAQWx9qNuSZ9I0VHjN49C/1jJ9myCbz32n4wQqD8GJHoQro050 TO6Ud7ktwsKtNBe5rXt4Wl431slHqCcLXcSNuFNesul4Ct0YDHZ3xbfxgvcKLe+iUYqW GU7/DQDqr6mZA7IbNxk0U//zXqCqLAjpY0LQGPiLQJohI+eYzHBXdvrKJDQxEEcIkXv7 /dR6Jpg49hnYuiBYJqJHRz6skoP6PKR8Xk/vJh4tiG2QSmV1OL09JFfLtRre9ECA5+3X pTFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=L+Sgzsuf; 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 g22si2517502ejx.518.2021.03.11.13.07.24; Thu, 11 Mar 2021 13:07:52 -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=L+Sgzsuf; 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 S229688AbhCKVED (ORCPT + 99 others); Thu, 11 Mar 2021 16:04:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbhCKVEC (ORCPT ); Thu, 11 Mar 2021 16:04:02 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 424D0C061574; Thu, 11 Mar 2021 13:04:02 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id l7so397314pfd.3; Thu, 11 Mar 2021 13:04:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ALluUOsoSqK4P+is/Y65pRMrQ+pvKVSisjX8vHlvv0Y=; b=L+SgzsufpGKpowTezzieLVjENQonW5ufjAo6UGxYlvwEYAI4R3Qj8ejfabUzZ/E35o eP9qU2CcWjrsiUp0VsPN31ep4vrG2ZKq3HcgPOxDBjbUXCYSXAWaZ+pmUCv+heU0V5oW /N+1KeI7yCDxPza1UrJh8a7SkpoEKLDHq4B+3hXsZXbrxyg/dy+zV98l3aAz6sMVOA3s Hjit8bp39EJkvN5r58j4op+3TcIFxih28ZAKczlzbdGAvz2SPAuwELFxIL8tExshpE0O NiOLjc2mc0mkMvJuD1RhE5BztpkbE4VkrEIxUTb2+BzrwzAHTdIVr3aSp3zFY9z7YoB6 XjNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ALluUOsoSqK4P+is/Y65pRMrQ+pvKVSisjX8vHlvv0Y=; b=Uc1M5jn0UHjh8u8B6BV4mmrqApdHu7o70oTM+Q6QSoo0yiHmSTjFdLE2ko2zrWCVMB eGjsQ6z+F9Nk+egA2QPi7GNVUT5+Fit+xGqATfBzFlVwY9+50Pg+qNHJjXHuSntHXhJ3 9JDRDwblzSeNZswTa3ul/+fAIBxYtRz3qAr0IHHDeIPe0tTUO13ORbNrKImNn64xhHXj u9z/kNiZz8cVu8nIHDCGreJCw8j6oRV0tquz7PczQMP1QvhVtc0cjYsPqgGg5j4YSAYp OZaQkhdAm5Z+v5I5i9EgB67t4o44ajCHRafXkyPAujU3YHzUnBmedjjxmLP59Age3qtB mF2Q== X-Gm-Message-State: AOAM5326HNjOl/NQJSvD015SASVlcGru3FVVYqJgmDQB97uEm2WRigVO pwPsLnSvD3EikrZnz9/CWNzyeFPF0UpO2RNe X-Received: by 2002:a63:161c:: with SMTP id w28mr8872540pgl.341.1615496641519; Thu, 11 Mar 2021 13:04:01 -0800 (PST) Received: from ?IPv6:2405:201:600d:a089:c1b4:679a:535a:d260? ([2405:201:600d:a089:c1b4:679a:535a:d260]) by smtp.gmail.com with ESMTPSA id s28sm3336112pfd.155.2021.03.11.13.03.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Mar 2021 13:04:01 -0800 (PST) Subject: Re: [RFC] scripts: kernel-doc: avoid warnings due to initial commented lines in file To: Lukas Bulwahn Cc: Markus Heiser , Jonathan Corbet , "open list:DOCUMENTATION" , Linux Kernel Mailing List , linux-kernel-mentees@lists.linuxfoundation.org References: <20210309125324.4456-1-yashsri421@gmail.com> <8959bf29-9ee1-6a1d-da18-f440232864f3@darmarit.de> From: Aditya Message-ID: <838a823b-f3fd-ed1b-70d1-82611f9f4ada@gmail.com> Date: Fri, 12 Mar 2021 02:33:55 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/3/21 11:49 am, Lukas Bulwahn wrote: > 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. > Hi Lukas! This is the diff of the warnings over kernel tree before and after applying these changes. There are 2 sections in this report: 1) for the warnings present before, but not after, and; 2) after but not before The part (2) contains, for some cases, where the warning for "warning: Incorrect use of kernel-doc format:" type has changed to "warning: wrong kernel-doc identifier on line:" type. The diff file can be found at: https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/kernel-doc/avoid_init_line_diff.txt Thanks Aditya