From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
linux-kernel@vger.kernel.org,
Jani Nikula <jani.nikula@linux.intel.com>
Subject: Re: [PATCH] kernel-doc: add support for handling global variables
Date: Sun, 16 Nov 2025 11:28:57 +0100 [thread overview]
Message-ID: <20251116112857.157acd6d@foz.lan> (raw)
In-Reply-To: <21b98e7a-93ae-451c-b7a1-e1468e8da0ca@infradead.org>
Em Fri, 14 Nov 2025 16:50:57 -0800
Randy Dunlap <rdunlap@infradead.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
next prev parent reply other threads:[~2025-11-16 10:29 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-07 16:22 [PATCH] kernel-doc: add support for handling global variables Mauro Carvalho Chehab
2025-09-07 21:34 ` Mauro Carvalho Chehab
2025-09-09 6:22 ` Randy Dunlap
2025-09-09 20:12 ` Mauro Carvalho Chehab
2025-09-09 7:27 ` Randy Dunlap
2025-09-09 15:57 ` Randy Dunlap
2025-09-09 16:18 ` Mauro Carvalho Chehab
2025-09-09 18:20 ` Randy Dunlap
2025-09-09 20:37 ` Mauro Carvalho Chehab
2025-09-09 19:58 ` Mauro Carvalho Chehab
2025-09-09 20:09 ` Mauro Carvalho Chehab
2025-09-09 21:06 ` Randy Dunlap
2025-09-09 23:09 ` Mauro Carvalho Chehab
2025-09-09 23:49 ` Randy Dunlap
2025-09-09 23:50 ` Randy Dunlap
2025-09-10 0:02 ` Randy Dunlap
2025-09-10 4:23 ` Mauro Carvalho Chehab
2025-09-10 5:59 ` Randy Dunlap
2025-09-10 6:13 ` Randy Dunlap
2025-09-10 8:54 ` Mauro Carvalho Chehab
2025-11-15 0:50 ` Randy Dunlap
2025-11-16 10:28 ` Mauro Carvalho Chehab [this message]
2025-11-16 19:46 ` Randy Dunlap
2025-11-17 9:45 ` Mauro Carvalho Chehab
2025-11-17 17:45 ` Randy Dunlap
2025-09-10 9:24 ` Jani Nikula
2025-09-10 12:13 ` Mauro Carvalho Chehab
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=20251116112857.157acd6d@foz.lan \
--to=mchehab+huawei@kernel.org \
--cc=corbet@lwn.net \
--cc=jani.nikula@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.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).