linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Jonathan Corbet <corbet@lwn.net>, linux-doc@vger.kernel.org
Cc: Rae Moar <rmoar@google.com>
Subject: Re: [PATCH] kernel-doc: Allow whitespace before comment start
Date: Fri, 6 Sep 2024 00:43:42 +0200	[thread overview]
Message-ID: <d780dfd8-79fb-4b4c-8764-bb18d32e98c2@intel.com> (raw)
In-Reply-To: <87plphho1w.fsf@trenco.lwn.net>



On 05.09.2024 21:56, Jonathan Corbet wrote:
> Michal Wajdeczko <michal.wajdeczko@intel.com> writes:
> 
>> There is some existing documentation that is formatted with some
>> indent at the beginning (like one in include/kunit/visibility.h).
>>
>> However, such notation is not recognized by the script and attempt
>> to include that in kernel documentation fails with:
>>
>> ../include/kunit/visibility.h:1: warning: no structured comments found
>>
>> Change the doc_start regex to also match /** with some whitespaces
>> at beginning of the line.
>>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> ---
>> Cc: Jonathan Corbet <corbet@lwn.net>
>> Cc: Rae Moar <rmoar@google.com>
>> ---
>>  scripts/kernel-doc | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> This patch adds vast numbers of build errors and warnings; did you try a
> build with it?

Oops, I'm pretty sure that I tried, but likely didn't rerun on fresh
tree, so seen just changes resulted from adding visibility.h

Sorry about that.

But looking now at those new errors/warnings and IMO it seems that all
of them are valid, mostly due to mistakes with formatting of the
comments, not that tool is now broken.


Few examples:

../kernel/resource.c:148: warning: This comment starts with '/**', but
isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
         * If the resource was allocated using memblock early during

    145 static void free_resource(struct resource *res)
    146 {
    147         /**
    148          * If the resource was allocated using memblock early

this should be formatted as normal multi-line comment inside the
function, not in a kernel-doc fashion


../include/drm/drm_atomic.h:170: warning: Cannot understand          *
@commit:
 on line 170 - I thought it was a doc line

    165 struct __drm_crtcs_state {
    166         struct drm_crtc *ptr;
    167         struct drm_crtc_state *state, *old_state, *new_state;
    168
    169         /**
    170          * @commit:
    171          *
    172          * A reference to the CRTC commit object that is kept

missing kernel-doc comment for the top level struct, only selected
members have kernel-doc


  reply	other threads:[~2024-09-05 22:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-29 20:25 [PATCH] kernel-doc: Allow whitespace before comment start Michal Wajdeczko
2024-09-05 19:56 ` Jonathan Corbet
2024-09-05 22:43   ` Michal Wajdeczko [this message]
2024-09-06 13:49     ` Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d780dfd8-79fb-4b4c-8764-bb18d32e98c2@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=rmoar@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).