linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Jonathan Corbet <corbet@lwn.net>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>
Cc: <netdev@vger.kernel.org>, <linux-doc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] docs: kdoc: fix duplicate section warning message
Date: Thu, 30 Oct 2025 12:47:49 -0700	[thread overview]
Message-ID: <0d8d4b82-f663-4bf8-abb3-87296c01ed22@intel.com> (raw)
In-Reply-To: <87frb0miti.fsf@trenco.lwn.net>


[-- Attachment #1.1: Type: text/plain, Size: 2053 bytes --]



On 10/30/2025 9:54 AM, Jonathan Corbet wrote:
> Jacob Keller <jacob.e.keller@intel.com> writes:
> 
>> The python version of the kernel-doc parser emits some strange warnings
>> with just a line number in certain cases:
>>
>> $ ./scripts/kernel-doc -Wall -none 'include/linux/virtio_config.h'
>> Warning: 174
>> Warning: 184
>> Warning: 190
>> Warning: include/linux/virtio_config.h:226 No description found for return value of '__virtio_test_bit'
>> Warning: include/linux/virtio_config.h:259 No description found for return value of 'virtio_has_feature'
>> Warning: include/linux/virtio_config.h:283 No description found for return value of 'virtio_has_dma_quirk'
>> Warning: include/linux/virtio_config.h:392 No description found for return value of 'virtqueue_set_affinity'
>>
>> I eventually tracked this down to the lone call of emit_msg() in the
>> KernelEntry class, which looks like:
>>
>>   self.emit_msg(self.new_start_line, f"duplicate section name '{name}'\n")
>>
>> This looks like all the other emit_msg calls. Unfortunately, the definition
>> within the KernelEntry class takes only a message parameter and not a line
>> number. The intended message is passed as the warning!
>>
>> Pass the filename to the KernelEntry class, and use this to build the log
>> message in the same way as the KernelDoc class does.
> 
> So I would like to thrash the logging more thoroughly in a number of
> ways.  Having separate log() and warn() functions would be a good start.
> 

I do agree the current situation is a bit messy. But I'll leave
improving that up to those more involved in maintaining the tool.

> Failing that, though, this looks to me like a reasonable fix.
> 

Great.

> However: it doesn't apply to docs-next.  I can try to make a version
> that does in the next day or three, but if you could respin it against
> the current docs, that would be great...?
> 

Hm. I was able to apply it cleanly yesterday. I will send a v2 based on
docs-next this afternoon.

> Thanks,
> 
> jon


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

      reply	other threads:[~2025-10-30 19:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-29 18:30 [PATCH] docs: kdoc: fix duplicate section warning message Jacob Keller
2025-10-29 19:45 ` Randy Dunlap
2025-10-29 20:04   ` Jacob Keller
2025-10-29 20:16     ` Jacob Keller
2025-10-29 20:39     ` Randy Dunlap
2025-10-30 15:44       ` Jacob Keller
2025-10-30 16:54 ` Jonathan Corbet
2025-10-30 19:47   ` Jacob Keller [this message]

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=0d8d4b82-f663-4bf8-abb3-87296c01ed22@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=corbet@lwn.net \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).