Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp422209pxf; Thu, 18 Mar 2021 03:57:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFqx4YEq8XOHj9jte1DRbjUzU62WtVcITx0bmwrF30VcLQyKbZNz5SQM3wh8NnKTa7vrV+ X-Received: by 2002:a17:907:10ce:: with SMTP id rv14mr40971738ejb.56.1616065045564; Thu, 18 Mar 2021 03:57:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616065045; cv=none; d=google.com; s=arc-20160816; b=cS+9aS6b5ggDbVgBHcl1gq0DVcjoGbEJrcg89ITVTKUdlvEK0jCUourUiqnhYOgiFS b+s/qwbRqaYbSQdO3duj5HDf31d91wJU0Bn6J7Xog26wcRxxLpvI2F1dxJHUo9hvSuZ5 qkKZ8dPBihz9ZXUfCgMhAWSay3NMM4cnCpfN4eCkhoZYFTQVTkbf2fYtNCiVUyNTE3DV gmbLFDS23dmS6wbPQYSViDDWgEwDR3SjnYThW/TbX2bSy1WfOqpwnAwlH4B6Fip9UGC8 2jp7ivDbTFN7J2sDjoNYL8KF1oaiHBTioX0pBKitol7cj+1SdB+VCUxXkt3zSZoZVlHI CDKA== 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=98pxet5C8Gy9S6SIgsmctncU1QY7hRiKp+O67nhGkow=; b=OK5iZL54Pm7AXLHt1bDQ0ATCUvgHj0SHJiUxIfxZRv3LatOyzuYoHbYIRm0NkmmlSj AtDM2pJB54md7Gg7S38OjJ4k9b1GKYT1ixLVNnVUxFRUf1Hh2i4+5RvE86kt35YxMws9 spZklUAdbU3KE4HTWk8BPHPFfrKt0HAbf3me5eKoLETfoZpVE6or2zIImtVNc7bOovx0 vkG/oaZu4HZG0pZ7HKuUfpVHJqXHQMGgKDkRMhRPYZP6ct9h2uJArzL3El1XLYUpOe3A n6DQOS6qrJJLtEdqMoRy9i7jACUhhBKzUV1LO6pz+5iRwCBZdI9ePxkDujqbAq+iRIGG bQ6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uMqQlC9M; 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 l3si931845ejd.203.2021.03.18.03.57.03; Thu, 18 Mar 2021 03:57:25 -0700 (PDT) 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=uMqQlC9M; 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 S230363AbhCRKzc (ORCPT + 99 others); Thu, 18 Mar 2021 06:55:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbhCRKzQ (ORCPT ); Thu, 18 Mar 2021 06:55:16 -0400 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A69ADC06174A; Thu, 18 Mar 2021 03:55:16 -0700 (PDT) Received: by mail-il1-x12f.google.com with SMTP id r8so4429429ilo.8; Thu, 18 Mar 2021 03:55:16 -0700 (PDT) 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=98pxet5C8Gy9S6SIgsmctncU1QY7hRiKp+O67nhGkow=; b=uMqQlC9MavXYkB3kXbenRs4kfB7G4L7LXt93bxBJ0oImb0yLDPiOGn158iYYIi6wJe qBFhMWmNwYpdNImlAhLHUa5n+0rscYmzi+2G2SyHssG3jeoVZ58Ax+eiLGNP7ej1zc/9 qzBi1DgfSEr1v79waqfnsgbyEKhfKmKB0M0zs2RZdvB4p7K7f+ikYi5Rs2ml+sN7k6oJ RvyEzHLbEsjo/09tTwv9j2+Pw4LQL6OFI+t62UEJurVc3+x4iJdqA8TzJPMrw4oZYY23 jRmso1NujbFnyaWHBGNcV+ihb13EUs43KG9gakaiCWbhmvuzsIpLbUqIJRsOUlEJah39 fxKA== 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=98pxet5C8Gy9S6SIgsmctncU1QY7hRiKp+O67nhGkow=; b=oXUNg5zd0UFBp3ZAQUcCSC3/ZFg3LCOEHKgVP7LZg+NQk4Hib1tRY0PI8tdVrLw8do fedydJe7MVInvPWWgQ5oizgCgdSaYNSnNYHdISWaIM/ZTrzWPHs75DAuWN5GEeuRL0YK X7LrIj/nfVyqKHSiboS2sCpWcd6iexK2j1RQhj/1rB3bcPIiws9GSAMXepFocZJMKGfc XpEl9SkdQmv+OIZL18Il0Lwza7bqhnaxW90ADh6TpVw3X4dwNi8Y5jSeW4xn03hvFN2C UTLEMbe6RydywjuoxZ42zkW+sMQiROF586SK3n7aWBiY/tMVCA4iDrSuRuusc+lH+mzH GNnA== X-Gm-Message-State: AOAM532cIbiLclIRdaOXo4i/kj3ClRnS7oiTgL8Ayg8AzdhQtKaGQID9 e9/RxUlWs0Tim1Q0isE3KeNyv4QcgAHII+Xq2o7X1tdInDg= X-Received: by 2002:a05:6e02:1aaa:: with SMTP id l10mr10477638ilv.251.1616064916024; Thu, 18 Mar 2021 03:55:16 -0700 (PDT) MIME-Version: 1.0 References: <20210309125324.4456-1-yashsri421@gmail.com> <8959bf29-9ee1-6a1d-da18-f440232864f3@darmarit.de> <871rcg2p8g.fsf@meer.lwn.net> In-Reply-To: <871rcg2p8g.fsf@meer.lwn.net> From: Lukas Bulwahn Date: Thu, 18 Mar 2021 11:55:05 +0100 Message-ID: Subject: Re: [RFC] scripts: kernel-doc: avoid warnings due to initial commented lines in file To: Jonathan Corbet Cc: Aditya , Markus Heiser , "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 Mon, Mar 15, 2021 at 8:25 PM Jonathan Corbet wrote: > > Aditya writes: > > >> 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. > > The problem is that it's marked as a kerneldoc comment without actually > being one; it looks like somebody's internal corporate formatting. The > fix is not to put a hack into kernel-doc - we have more than enough of > those in the file already! The right thing to do is to remove the extra > "*" so that the comment doesn't look like a kerneldoc comment anymore. > Jonathan, I agree that that is the right thing to do. Aditya is already following through and is cleaning up the repository. So, let us be optimistic that we will have cleaned up all of those occurrences within a few weeks. But how to continue? Someone is going to come with new files and introduce this pattern again in the repository; and as of now, we do not have a script to identify that pattern and react... Running kernel-doc on the whole tree continuously and just observing the new warnings is probably not going to work as of now: there are 20,000 kernel-doc warnings and at least, I cannot see a really good way to filter out this one specific type of issue among all the warnings that will might appear in the future (without specifically applying Aditya's patch and looking at the diff before and after). I wonder if we could extend kernel-doc (not your preferred option as it seems) for a new dedicated warning message or maintain a separate kernel-doc sanity checking script to emit a dedicated warning based on some heuristics that suggests when a "header comment" is probably unintentionally declared as a "kernel-doc comment" when it really should not be. Jonathan, would you then prefer to have a separate kernel-doc sanity checking script that then allows us to maintain checking for patterns we already cleaned up? Eventually, we might have cleaned up enough to just use kernel-doc and keep it kind of warning-free (as with make htmldocs now) and then, we can simply follow up with kernel-doc and some basic monitoring scripts, but with 20,000 warnings in the whole repository to start with, it is still a long way to that point, IMHO. Lukas