public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* linux-next: build warnings after merge of Linus' tree
@ 2021-03-29  9:04 Stephen Rothwell
  2021-04-21  6:23 ` Stephen Rothwell
  0 siblings, 1 reply; 18+ messages in thread
From: Stephen Rothwell @ 2021-03-29  9:04 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Greg Kroah-Hartman,
	Grant Likely, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 756 bytes --]

Hi all,

After merging Linus' tree, today's linux-next build (htmldocs) produced
these warnings:

include/linux/of.h:1211: warning: Function parameter or member 'output' not described in 'of_property_read_string_index'
include/linux/of.h:1211: warning: Excess function parameter 'out_string' description in 'of_property_read_string_index'

Introduced by commit

  a87fa1d81a9f ("of: Fix overflow bug in string property parsing functions")

include/linux/of.h:1480: warning: cannot understand function prototype: 'enum of_overlay_notify_action '

Introduced by commit

  39a842e22c1b ("of/overlay: add of overlay notifications")

I assume that these warnings have turned up now due to better(?) tooling.

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build warnings after merge of Linus' tree
  2021-03-29  9:04 Stephen Rothwell
@ 2021-04-21  6:23 ` Stephen Rothwell
  2021-04-21 13:06   ` Rob Herring
  0 siblings, 1 reply; 18+ messages in thread
From: Stephen Rothwell @ 2021-04-21  6:23 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Greg Kroah-Hartman,
	Grant Likely, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 729 bytes --]

Hi all,

On Mon, 29 Mar 2021 20:04:10 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> After merging Linus' tree, today's linux-next build (htmldocs) produced
> these warnings:
> 
> include/linux/of.h:1211: warning: Function parameter or member 'output' not described in 'of_property_read_string_index'
> include/linux/of.h:1211: warning: Excess function parameter 'out_string' description in 'of_property_read_string_index'
> 
> Introduced by commit
> 
>   a87fa1d81a9f ("of: Fix overflow bug in string property parsing functions")
> 
> I assume that these warnings have turned up now due to better(?) tooling.

I am still seeing these warnings (as of next-20210420).

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build warnings after merge of Linus' tree
  2021-04-21  6:23 ` Stephen Rothwell
@ 2021-04-21 13:06   ` Rob Herring
  0 siblings, 0 replies; 18+ messages in thread
From: Rob Herring @ 2021-04-21 13:06 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Greg Kroah-Hartman,
	Grant Likely, Linux Kernel Mailing List, Linux Next Mailing List

On Wed, Apr 21, 2021 at 1:23 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> On Mon, 29 Mar 2021 20:04:10 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging Linus' tree, today's linux-next build (htmldocs) produced
> > these warnings:
> >
> > include/linux/of.h:1211: warning: Function parameter or member 'output' not described in 'of_property_read_string_index'
> > include/linux/of.h:1211: warning: Excess function parameter 'out_string' description in 'of_property_read_string_index'
> >
> > Introduced by commit
> >
> >   a87fa1d81a9f ("of: Fix overflow bug in string property parsing functions")
> >
> > I assume that these warnings have turned up now due to better(?) tooling.
>
> I am still seeing these warnings (as of next-20210420).

A fix is now in my tree.

Rob

^ permalink raw reply	[flat|nested] 18+ messages in thread

* linux-next: build warnings after merge of Linus' tree
@ 2023-05-08  4:49 Stephen Rothwell
  2023-05-08  4:52 ` Randy Dunlap
  0 siblings, 1 reply; 18+ messages in thread
From: Stephen Rothwell @ 2023-05-08  4:49 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Mathieu Desnoyers, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

Hi all,

While building Linus' tree, today's linux-next build (htmldocs)
produced these warnings:

kernel/sched/core.c:11496: warning: Cannot understand  * @cid_lock: Guarantee forward-progress of cid allocation.
 on line 11496 - I thought it was a doc line
kernel/sched/core.c:11505: warning: Cannot understand  * @use_cid_lock: Select cid allocation behavior: lock-free vs spinlock.
 on line 11505 - I thought it was a doc line

Introduced by commit

  223baf9d17f2 ("sched: Fix performance regression introduced by mm_cid")

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build warnings after merge of Linus' tree
  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
  0 siblings, 2 replies; 18+ messages in thread
From: Randy Dunlap @ 2023-05-08  4:52 UTC (permalink / raw)
  To: Stephen Rothwell, Peter Zijlstra
  Cc: Mathieu Desnoyers, Linux Kernel Mailing List,
	Linux Next Mailing List



On 5/7/23 21:49, Stephen Rothwell wrote:
> Hi all,
> 
> While building Linus' tree, today's linux-next build (htmldocs)
> produced these warnings:
> 
> kernel/sched/core.c:11496: warning: Cannot understand  * @cid_lock: Guarantee forward-progress of cid allocation.
>  on line 11496 - I thought it was a doc line
> kernel/sched/core.c:11505: warning: Cannot understand  * @use_cid_lock: Select cid allocation behavior: lock-free vs spinlock.
>  on line 11505 - I thought it was a doc line
> 
> Introduced by commit
> 
>   223baf9d17f2 ("sched: Fix performance regression introduced by mm_cid")
> 

I have sent a patch:
  https://lore.kernel.org/lkml/20230428031111.322-1-rdunlap@infradead.org
but haven't seen any replies to it (possibly due to the merge window or travel).

-- 
~Randy

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build warnings after merge of Linus' tree
  2023-05-08  4:52 ` Randy Dunlap
@ 2023-05-08  4:53   ` Randy Dunlap
  2023-05-08  7:50   ` Peter Zijlstra
  1 sibling, 0 replies; 18+ messages in thread
From: Randy Dunlap @ 2023-05-08  4:53 UTC (permalink / raw)
  To: Stephen Rothwell, Peter Zijlstra
  Cc: Mathieu Desnoyers, Linux Kernel Mailing List,
	Linux Next Mailing List



On 5/7/23 21:52, Randy Dunlap wrote:
> 
> 
> On 5/7/23 21:49, Stephen Rothwell wrote:
>> Hi all,
>>
>> While building Linus' tree, today's linux-next build (htmldocs)
>> produced these warnings:
>>
>> kernel/sched/core.c:11496: warning: Cannot understand  * @cid_lock: Guarantee forward-progress of cid allocation.
>>  on line 11496 - I thought it was a doc line
>> kernel/sched/core.c:11505: warning: Cannot understand  * @use_cid_lock: Select cid allocation behavior: lock-free vs spinlock.
>>  on line 11505 - I thought it was a doc line
>>
>> Introduced by commit
>>
>>   223baf9d17f2 ("sched: Fix performance regression introduced by mm_cid")
>>
> 
> I have sent a patch:
>   https://lore.kernel.org/lkml/20230428031111.322-1-rdunlap@infradead.org
> but haven't seen any replies to it (possibly due to the merge window or travel).
> 

Oops, Peter did reply, but no info on merging it.

-- 
~Randy

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build warnings after merge of Linus' tree
  2023-05-08  4:52 ` Randy Dunlap
  2023-05-08  4:53   ` Randy Dunlap
@ 2023-05-08  7:50   ` Peter Zijlstra
  1 sibling, 0 replies; 18+ messages in thread
From: Peter Zijlstra @ 2023-05-08  7:50 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Stephen Rothwell, Mathieu Desnoyers, Linux Kernel Mailing List,
	Linux Next Mailing List

On Sun, May 07, 2023 at 09:52:22PM -0700, Randy Dunlap wrote:
> 
> 
> On 5/7/23 21:49, Stephen Rothwell wrote:
> > Hi all,
> > 
> > While building Linus' tree, today's linux-next build (htmldocs)
> > produced these warnings:
> > 
> > kernel/sched/core.c:11496: warning: Cannot understand  * @cid_lock: Guarantee forward-progress of cid allocation.
> >  on line 11496 - I thought it was a doc line
> > kernel/sched/core.c:11505: warning: Cannot understand  * @use_cid_lock: Select cid allocation behavior: lock-free vs spinlock.
> >  on line 11505 - I thought it was a doc line
> > 
> > Introduced by commit
> > 
> >   223baf9d17f2 ("sched: Fix performance regression introduced by mm_cid")
> > 
> 
> I have sent a patch:
>   https://lore.kernel.org/lkml/20230428031111.322-1-rdunlap@infradead.org
> but haven't seen any replies to it (possibly due to the merge window or travel).

I have it, and now that -rc1 is out the door, I'll queue it for -urgent.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* linux-next: build warnings after merge of Linus' tree
@ 2025-04-06 22:48 Stephen Rothwell
  0 siblings, 0 replies; 18+ messages in thread
From: Stephen Rothwell @ 2025-04-06 22:48 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Jeff Johnson, Linus Torvalds, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 438 bytes --]

Hi all,

After merging Linus' tree, today's linux-next build (x86_64
allmodconfig) produced these warnings:

WARNING: modpost: missing MODULE_DESCRIPTION() in mm/kasan/kasan_test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in lib/tests/slub_kunit.o

Introduced by commits

  6c6c1fc09de3 ("modpost: require a MODULE_DESCRIPTION()")
  6f110a5e4f99 ("Disable SLUB_TINY for build testing")

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build warnings after merge of Linus' tree
@ 2025-04-07  8:59 Venkat
  2025-04-07  9:47 ` Venkat Rao Bagalkote
  0 siblings, 1 reply; 18+ messages in thread
From: Venkat @ 2025-04-07  8:59 UTC (permalink / raw)
  To: peterz
  Cc: linux-kernel, linux-next, mathieu.desnoyers, rdunlap,
	Stephen Rothwell

On IBM Power9 only below warning is observed. 

WARNING: modpost: missing MODULE_DESCRIPTION() in lib/tests/slub_kunit.o

I have tested the patch and the above reported warning is fixed. Please add below tag.


Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>

Regards,
Venkat.



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build warnings after merge of Linus' tree
  2025-04-07  8:59 Venkat
@ 2025-04-07  9:47 ` Venkat Rao Bagalkote
  0 siblings, 0 replies; 18+ messages in thread
From: Venkat Rao Bagalkote @ 2025-04-07  9:47 UTC (permalink / raw)
  To: peterz
  Cc: linux-kernel, linux-next, mathieu.desnoyers, rdunlap,
	Stephen Rothwell

I think I have messed up. Please ignore below mail.

On 07/04/25 2:29 pm, Venkat wrote:
> On IBM Power9 only below warning is observed.
>
> WARNING: modpost: missing MODULE_DESCRIPTION() in lib/tests/slub_kunit.o
>
> I have tested the patch and the above reported warning is fixed. Please add below tag.
>
>
> Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
>
> Regards,
> Venkat.
>
>
>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* linux-next: build warnings after merge of Linus' tree
@ 2025-11-13  1:55 Stephen Rothwell
  2025-11-13  8:16 ` Mauro Carvalho Chehab
  2025-11-13  8:49 ` Michael S. Tsirkin
  0 siblings, 2 replies; 18+ messages in thread
From: Stephen Rothwell @ 2025-11-13  1:55 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Mauro Carvalho Chehab, Jason Wang, Michael S. Tsirkin,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

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:".

These have turned up now since a bug was fixed that was repressing a
lot of warnings.

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build warnings after merge of Linus' tree
  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  8:49 ` Michael S. Tsirkin
  1 sibling, 1 reply; 18+ messages in thread
From: Mauro Carvalho Chehab @ 2025-11-13  8:16 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Jonathan Corbet, Mauro Carvalho Chehab, Jason Wang,
	Michael S. Tsirkin, Linux Kernel Mailing List,
	Linux Next Mailing List

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. The regular expression that pick sections
is:

	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*:([^:].*)?$',
	           flags=re.I, cache=False)

So, basically, it seeks, inside a kernel-doc comment, in case-insensitive
mode, for:

	"\sreturns?:"

In this specific case, virtio_map_ops is using this pattern multiple
times:

	/**
	 * struct virtio_map_ops - operations for mapping buffer for a virtio device
	 * Note: For transport that has its own mapping logic it must
	 * implements all of the operations
	 * @map_page: map a buffer to the device
	 *      map: metadata for performing mapping
	 *      page: the page that will be mapped by the device
	 *      offset: the offset in the page for a buffer
	 *      size: the buffer size
	 *      dir: mapping direction
	 *      attrs: mapping attributes
	 *      Returns: the mapped address
(first occurrence)
	...
	 * @alloc: alloc a coherent buffer mapping
	 *      map: metadata for performing mapping
	 *      size: the size of the buffer
	 *      map_handle: the mapping address to sync
	 *      gfp: allocation flag (GFP_XXX)
	 *      Returns: virtual address of the allocated buffer
(second occurrence, others follow)

As result, it strips "returns" from members output:

	  **Members**

	  ``map_page``
	    map a buffer to the device
	    map: metadata for performing mapping
	    page: the page that will be mapped by the device
	    offset: the offset in the page for a buffer
	    size: the buffer size
	    dir: mapping direction
	    attrs: mapping attributes

	  ``unmap_page``
	...


And creates a return section with each returns: appended:

	**Return**

	the mapped address

	virtual address of the allocated buffer

	whether the buffer needs synchronization

	the maximum buffer size that can be mapped

which is not what it is expected. Such behavior is there since the Perl
version (and the warning), but a patch for the old version disabled
such warning by default (probably because it was too verbose on that
time).

Btw, if you see struct virtio_config_ops, there instead of "Returns: foo"
they use "Returns foo", which produces the desired output:

	  **Members**
...
	  ``generation``
	    config generation counter (optional)
	    vdev: the virtio_device
	    Returns the config generation counter


So, probably the quickest fix would be do to:

	sed s,Returns:,Returns, -i include/linux/virtio_config.h

> These have turned up now since a bug was fixed that was repressing a
> lot of warnings.

The change actually disabled the warning-suppression logic that
was ported from the Perl script, where a lot of real problems at the
kernel-doc markup were ignored. E.g. those command line arguments:

  -Wreturn, --wreturn   Warns about the lack of a return markup on functions.
  -Wshort-desc, -Wshort-description, --wshort-desc
                        Warns if initial short description is missing
  -Wcontents-before-sections, --wcontents-before-sections
                        
                        Warns if there are contents before sections (deprecated).
                        
                        This option is kept just for backward-compatibility, but it does nothing,
                        neither here nor at the original Perl script.
  -Wall, --wall         Enable all types of warnings

are now ignored, so it outputs as if -Wall was passed to it.


Thanks,
Mauro

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build warnings after merge of Linus' tree
  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  8:49 ` Michael S. Tsirkin
  2025-11-13 10:32   ` Mauro Carvalho Chehab
  1 sibling, 1 reply; 18+ messages in thread
From: Michael S. Tsirkin @ 2025-11-13  8:49 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Jonathan Corbet, Mauro Carvalho Chehab, Jason Wang,
	Linux Kernel Mailing List, Linux Next Mailing List

On Thu, Nov 13, 2025 at 12:55:37PM +1100, Stephen Rothwell wrote:
> 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:".
> 
> These have turned up now since a bug was fixed that was repressing a
> lot of warnings.

Indeed. But the rest of header says Returns ... without : so I will just
fix this one to do the same. I also fixed other issues in the comments
in this header while I was at it. Will post shortly.


> -- 
> Cheers,
> Stephen Rothwell



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build warnings after merge of Linus' tree
  2025-11-13  8:49 ` Michael S. Tsirkin
@ 2025-11-13 10:32   ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 18+ messages in thread
From: Mauro Carvalho Chehab @ 2025-11-13 10:32 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Stephen Rothwell, Jonathan Corbet, Mauro Carvalho Chehab,
	Jason Wang, Linux Kernel Mailing List, Linux Next Mailing List

On Thu, Nov 13, 2025 at 03:49:27AM -0500, Michael S. Tsirkin wrote:
> On Thu, Nov 13, 2025 at 12:55:37PM +1100, Stephen Rothwell wrote:
> > 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:".
> > 
> > These have turned up now since a bug was fixed that was repressing a
> > lot of warnings.
> 
> Indeed. But the rest of header says Returns ... without : so I will just
> fix this one to do the same. I also fixed other issues in the comments
> in this header while I was at it. Will post shortly.

That's the best approach. We could instead change the new section detection
regex to accept just one space at most:

    diff --git a/scripts/lib/kdoc/kdoc_parser.py b/scripts/lib/kdoc/kdoc_parser.py
    index f7dbb0868367..bab0ec3abe31 100644
    --- a/scripts/lib/kdoc/kdoc_parser.py
    +++ b/scripts/lib/kdoc/kdoc_parser.py
    @@ -46,7 +46,7 @@ doc_decl = doc_com + KernRe(r'(\w+)', cache=False)
     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)
 
     doc_content = doc_com_body + KernRe(r'(.*)', cache=False)

(patch not tested)

But, if we do so, someone has to check if this won't cause regressions
elsewhere. I'm almost sure a change like that will break something...

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build warnings after merge of Linus' tree
  2025-11-13  8:16 ` Mauro Carvalho Chehab
@ 2025-11-13 16:23   ` Jonathan Corbet
  2025-11-13 22:01     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 18+ messages in thread
From: Jonathan Corbet @ 2025-11-13 16:23 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Stephen Rothwell
  Cc: Mauro Carvalho Chehab, Jason Wang, Michael S. Tsirkin,
	Linux Kernel Mailing List, Linux Next Mailing List

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...

jon

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build warnings after merge of Linus' tree
  2025-11-13 16:23   ` Jonathan Corbet
@ 2025-11-13 22:01     ` Mauro Carvalho Chehab
  2025-11-13 22:28       ` Randy Dunlap
  0 siblings, 1 reply; 18+ messages in thread
From: Mauro Carvalho Chehab @ 2025-11-13 22:01 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Stephen Rothwell, Mauro Carvalho Chehab, Jason Wang,
	Michael S. Tsirkin, Linux Kernel Mailing List,
	Linux Next Mailing List

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.


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.

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build warnings after merge of Linus' tree
  2025-11-13 22:01     ` Mauro Carvalho Chehab
@ 2025-11-13 22:28       ` Randy Dunlap
  2025-11-13 22:42         ` Randy Dunlap
  0 siblings, 1 reply; 18+ messages in thread
From: Randy Dunlap @ 2025-11-13 22:28 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Jonathan Corbet
  Cc: Stephen Rothwell, Mauro Carvalho Chehab, Jason Wang,
	Michael S. Tsirkin, Linux Kernel Mailing List,
	Linux Next Mailing List



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.


-- 
~Randy


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: linux-next: build warnings after merge of Linus' tree
  2025-11-13 22:28       ` Randy Dunlap
@ 2025-11-13 22:42         ` Randy Dunlap
  0 siblings, 0 replies; 18+ messages in thread
From: Randy Dunlap @ 2025-11-13 22:42 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Jonathan Corbet
  Cc: Stephen Rothwell, Mauro Carvalho Chehab, Jason Wang,
	Michael S. Tsirkin, Linux Kernel Mailing List,
	Linux Next Mailing List



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


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-11-13 22:42 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox