[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251116112857.157acd6d@foz.lan>
Date: Sun, 16 Nov 2025 11:28:57 +0100
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: Linux Doc Mailing List <linux-doc@...r.kernel.org>, Jonathan Corbet
<corbet@....net>, linux-kernel@...r.kernel.org, Jani Nikula
<jani.nikula@...ux.intel.com>
Subject: Re: [PATCH] kernel-doc: add support for handling global variables
Em Fri, 14 Nov 2025 16:50:57 -0800
Randy Dunlap <rdunlap@...radead.org> escreveu:
> The v2 patch certainly is better with the new regexes to ignore.
> I have a few minor changes that I would like to add (in a trivial patch below).
See my comments below.
> And there are still a few cases that are not handled correctly.
> (see my kdoc-globals-test.patch from 9/9/2025)
Where is it?
> Also, changing to "var" instead of "global" is good IMO.
I'll send a v3 with the rename in a few.
> ---
> scripts/lib/kdoc/kdoc_output.py | 2 +-
> scripts/lib/kdoc/kdoc_parser.py | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> --- linux-next-20251114.orig/scripts/lib/kdoc/kdoc_output.py
> +++ linux-next-20251114/scripts/lib/kdoc/kdoc_output.py
> @@ -808,7 +808,7 @@ class ManFormat(OutputFormat):
> self.data += f"{prototype} \\- {args['purpose']}\n"
>
> self.data += ".SH SYNOPSIS\n"
> - self.data += f"enum {name}" + " {\n"
> + self.data += f"{prototype}" + ";\n"
This one should probably be a separate patch from you after the
patch, as it is related to enum, and not var tag.
>
> if args.other_stuff["default_val"]:
> self.data += f'.SH "Initialization"' + "\n"
> --- linux-next-20251114.orig/scripts/lib/kdoc/kdoc_parser.py
> +++ linux-next-20251114/scripts/lib/kdoc/kdoc_parser.py
> @@ -939,6 +939,7 @@ class KernelDoc:
> (KernRe(r"(?://.*)$"), ""),
> (KernRe(r"(?:/\*.*\*/)"), ""),
> (KernRe(r";$"), ""),
> + (KernRe(r"=.*"), ""),
Makes sense. I'll add it to the v3.
My suggestion is that, once I sent v3, you pick it at the beginning
on your series and then add your changes on separate patches
after that, including the one using "{prototype}" for enum.
Thanks,
Mauro
Powered by blists - more mailing lists