From: Jani Nikula <jani.nikula@linux.intel.com>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>,
Randy Dunlap <rdunlap@infradead.org>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Akira Yokosawa <akiyks@gmail.com>, Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH 0/2] Move kernel-doc to tools/docs
Date: Thu, 15 Jan 2026 14:58:40 +0200 [thread overview]
Message-ID: <21372af21ce06af04d6c6fbfff3432118dc2483f@intel.com> (raw)
In-Reply-To: <20260115132358.017e6436@foz.lan>
On Thu, 15 Jan 2026, Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote:
> Em Thu, 15 Jan 2026 12:33:10 +0200
> Jani Nikula <jani.nikula@linux.intel.com> escreveu:
>
>> On Wed, 14 Jan 2026, Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote:
>> > Em Wed, 14 Jan 2026 12:24:31 -0700
>> > Jonathan Corbet <corbet@lwn.net> escreveu:
>> >
>> >> Randy Dunlap <rdunlap@infradead.org> writes:
>> >>
>> >> > I do many of these on a regular basis:
>> >> >
>> >> > $ ./scripts/kernel-doc -none -Wall <path_to_source_file>
>> >> >
>> >> > Will I still be able to do that (by using ./tools/doc/kernel-doc ...)?
>> >>
>> >> Yes. The tool moves, but its functionality remains unchanged.
>> >
>> > That's actually a good point: should we preserve a link on scripts
>> > pointing to ../tools/doc/kernel-doc? I suspect that a change like
>> > that could break some machinery on several CI tools and scripts
>> > out there. If so, it could be useful to keep a link - at least for
>> > a couple of kernel releases.
>>
>> I think the tool source should be called kernel_doc.py or something, and
>> scripts/kernel-doc should be a script running the former.
>
> Works for me.
>
>> In regular python projects the script would be generated based on
>> pyproject.toml or something, but regardless the source file name would
>> adhere to PEP requirements.
>
> Agreed.
>
>> Additionally, the kernel-doc source could be a package under
>> tools/lib/python, with __main__.py so you could run it using the package
>> name 'python3 -m foo' style.
>
> This is where we diverge: all the code needed to produce docs are
> already inside modules which are called directly via Sphinx extension.
>
> So, I can't see an advantage on moving main to __main__.py.
The main() doesn't have to be in __main__.py, and I didn't suggest
so. But if there's a package that contains the kernel-doc cli, it would
be quite normal to have a __main__.py to run the cli, so that 'python3
-m package' works, and you don't have to know or specify the exact file
the main() function resides in.
BR,
Jani.
>
>
> Thanks,
> Mauro
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-01-15 12:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 16:41 [PATCH 0/2] Move kernel-doc to tools/docs Jonathan Corbet
2026-01-14 16:41 ` [PATCH 1/2] docs: kdoc: remove support for an external kernel-doc from sphinx Jonathan Corbet
2026-01-14 19:42 ` Mauro Carvalho Chehab
2026-01-14 16:41 ` [PATCH 2/2] Move kernel-doc to tools/docs Jonathan Corbet
2026-01-14 20:00 ` Mauro Carvalho Chehab
2026-01-19 8:23 ` kernel test robot
2026-01-19 10:27 ` Mauro Carvalho Chehab
2026-01-14 19:20 ` [PATCH 0/2] " Randy Dunlap
2026-01-14 19:24 ` Jonathan Corbet
2026-01-14 20:25 ` Mauro Carvalho Chehab
2026-01-15 10:33 ` Jani Nikula
2026-01-15 12:23 ` Mauro Carvalho Chehab
2026-01-15 12:58 ` Jani Nikula [this message]
2026-01-15 15:05 ` Jonathan Corbet
2026-01-15 17:31 ` Randy Dunlap
2026-01-15 18:04 ` Jonathan Corbet
2026-01-15 18:48 ` Randy Dunlap
2026-01-16 10:38 ` Jani Nikula
2026-01-16 17:44 ` Jonathan Corbet
2026-01-17 10:29 ` Mauro Carvalho Chehab
2026-01-16 17:48 ` Jonathan Corbet
2026-01-17 10:00 ` Mauro Carvalho Chehab
2026-01-17 18:09 ` Randy Dunlap
2026-01-19 10:17 ` 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=21372af21ce06af04d6c6fbfff3432118dc2483f@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=akiyks@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=rdunlap@infradead.org \
--cc=shuah@kernel.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