From: Randy Dunlap <rdunlap@infradead.org>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Jonathan Corbet <corbet@lwn.net>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Jason Wang <jasowang@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build warnings after merge of Linus' tree
Date: Thu, 13 Nov 2025 14:42:48 -0800 [thread overview]
Message-ID: <357e40fc-aaba-4efc-802c-e428d2454fd1@infradead.org> (raw)
In-Reply-To: <e29ba7e3-9fdb-4ae8-98a8-41c7b340224b@infradead.org>
On 11/13/25 2:28 PM, Randy Dunlap wrote:
>
>
> On 11/13/25 2:01 PM, Mauro Carvalho Chehab wrote:
>> Em Thu, 13 Nov 2025 09:23:27 -0700
>> Jonathan Corbet <corbet@lwn.net> escreveu:
>>
>>> Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes:
>>>
>>>> Em Thu, 13 Nov 2025 12:55:37 +1100
>>>> Stephen Rothwell <sfr@canb.auug.org.au> escreveu:
>>>>
>>>>> Hi all,
>>>>>
>>>>> Today's linux-next build (htmldocs) produced these warnings:
>>>>>
>>>>> WARNING: /home/sfr/kernels/next/next/include/linux/virtio_config.h:174 duplicate section name 'Return'
>>>>> WARNING: /home/sfr/kernels/next/next/include/linux/virtio_config.h:184 duplicate section name 'Return'
>>>>> WARNING: /home/sfr/kernels/next/next/include/linux/virtio_config.h:190 duplicate section name 'Return'
>>>>>
>>>>> Introduced by commit
>>>>>
>>>>> bee8c7c24b73 ("virtio: introduce map ops in virtio core")
>>>>>
>>>>> but is probably a bug in our scripts as those lines above have "Returns:"
>>>>> in them, not "Return:".
>>>>
>>>> It is not a mistake. What happens is that, when kernel-doc detects
>>>> something like:
>>>>
>>>> /**
>>>> ...
>>>> * return: something
>>>> ...
>>>> * returns: else
>>>> ...
>>>> */
>>>>
>>>> we have a duplicated section.
>>>
>>> This seems like something we should be able to fix...will try to find
>>> some time to look into it...
>>
>> It is easy to fix, but it may break some things:
>>
>>
>> $ git grep -l -E "\* \s+returns?:"
>> drivers/edac/i5000_edac.c
>> drivers/edac/i5400_edac.c
>> drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c
>> drivers/gpu/drm/ingenic/ingenic-ipu.c
>> drivers/misc/sgi-gru/grufault.c
>> drivers/net/wireless/marvell/libertas/cmd.c
>> drivers/net/wireless/marvell/libertas/firmware.c
>> drivers/net/wireless/marvell/libertas/if_usb.c
>> drivers/net/wireless/marvell/libertas/main.c
>> drivers/pci/rom.c
>> drivers/scsi/qla2xxx/qla_edif.c
>> drivers/tty/moxa.c
>>
>> And this is only for "return" section. There are also other places
>> where sections have more than one space. For instance, on 219
>> files, we have:
>>
>> $ git grep -l -E "\* \s+@\w+:"|wc -l
>> 219
>>
>> like here:
>>
>> drivers/ata/sata_mv.c-/**
>> drivers/ata/sata_mv.c- * mv_print_info - Dump key info to kernel log for perusal.
>> drivers/ata/sata_mv.c: * @host: ATA host to print info about
>> drivers/ata/sata_mv.c- *
>> drivers/ata/sata_mv.c- * FIXME: complete this.
>
> Yes, lots like that.
>
>>
>> So, before changing the regex:
>>
>> known_section_names = 'description|context|returns?|notes?|examples?'
>> known_sections = KernRe(known_section_names, flags = re.I)
>> doc_sect = doc_com + \
>> - KernRe(r'\s*(@[.\w]+|@\.\.\.|' + known_section_names + r')\s*:([^:].*)?$',
>> + KernRe(r'\s?(@[.\w]+|@\.\.\.|' + known_section_names + r')\s*:([^:].*)?$',
>> flags=re.I, cache=False)
>>
>> to accept only a single space or no spaces, we need to change kernel-doc
>> markups on lots of files.
>>
>> Ok, an alternative would be to identify the indentation, but this could
>> also be problematic.
>
> We also need to be aware that the problem does not involve only
> multiple "return:/returns:" lines. I.e., the ':' is not required.
>
> Currently just having a kernel-doc comment like
> * this function could break the machine but instead it will just
> * return an error before doing that.
>
> causes a warning.
> Just run 'make mandocs &> mandocs.foo' and you can see lots of false
> warnings.
Big OOPS! I ran 'make mandocs' on linux-next-20251112. If I use
linux-next-20251113, most of them are gone. :)
Thanks.
--
~Randy
next prev parent reply other threads:[~2025-11-13 22:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 1:55 linux-next: build warnings after merge of Linus' tree Stephen Rothwell
2025-11-13 8:16 ` Mauro Carvalho Chehab
2025-11-13 16:23 ` Jonathan Corbet
2025-11-13 22:01 ` Mauro Carvalho Chehab
2025-11-13 22:28 ` Randy Dunlap
2025-11-13 22:42 ` Randy Dunlap [this message]
2025-11-13 8:49 ` Michael S. Tsirkin
2025-11-13 10:32 ` Mauro Carvalho Chehab
-- strict thread matches above, loose matches on Subject: below --
2025-04-07 8:59 Venkat
2025-04-07 9:47 ` Venkat Rao Bagalkote
2025-04-06 22:48 Stephen Rothwell
2023-05-08 4:49 Stephen Rothwell
2023-05-08 4:52 ` Randy Dunlap
2023-05-08 4:53 ` Randy Dunlap
2023-05-08 7:50 ` Peter Zijlstra
2021-03-29 9:04 Stephen Rothwell
2021-04-21 6:23 ` Stephen Rothwell
2021-04-21 13:06 ` Rob Herring
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=357e40fc-aaba-4efc-802c-e428d2454fd1@infradead.org \
--to=rdunlap@infradead.org \
--cc=corbet@lwn.net \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=mchehab@kernel.org \
--cc=mst@redhat.com \
--cc=sfr@canb.auug.org.au \
/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