[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dskdc44um6l6sw43uazfpzmsv4tkesog7sro22qkvzxyflvurt@pwhb3rs44ga7>
Date: Thu, 13 Nov 2025 11:32:15 +0100
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Jonathan Corbet <corbet@....net>, Mauro Carvalho Chehab <mchehab@...nel.org>,
Jason Wang <jasowang@...hat.com>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build warnings after merge of Linus' tree
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
Powered by blists - more mailing lists