.../maintainer/maintainer-entry-profile.rst | 24 +-- .../process/maintainer-handbooks.rst | 17 +- Documentation/process/maintainers.rst | 2 + Documentation/sphinx/maintainers_include.py | 161 +++++++++++++++--- 4 files changed, 150 insertions(+), 54 deletions(-)
Hi Jon,
This is basically the same patch series I sent during the merge
window, rebased on the top of post 7.1-rc1 docs-next branch.
It is tested both with and without O=DOCS.
It contains just one extra trivial patch adding a missing SPDX
header, and, on v4, I dropped two patches touching MAINTAINERS,
as those aren't needed anymore.
This patch series change the way maintainer entry profile links
are added to the documentation. Instead of having an entry for
each of them at an ReST file, get them from MAINTAINERS content.
That should likely make easier to maintain, as there will be a single
point to place all such profiles.
The output is a per-subsystem sorted (*) series of links shown as a
list like this:
- Arm And Arm64 Soc Sub-Architectures (Common Parts)
- Arm/Samsung S3C, S5P And Exynos Arm Architectures
- Arm/Tesla Fsd Soc Support
...
- Xfs Filesystem
Please notice that the series is doing one logical change per patch.
I could have merged some changes altogether, but I opted doing it
in small steps to help reviews. If you prefer, feel free to merge
maintainers_include changes on merge.
There is one interesting side effect of this series: there is no
need to add rst files containing profiles inside a TOC tree: Just
creating the file anywhere inside Documentation and adding a P entry
is enough. Adding them to a TOC won't hurt.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Suggested-by: Dan Williams <djbw@kernel.org>
Closes: https://lore.kernel.org/linux-doc/69dd6299440be_147c801005b@djbw-dev.notmuch/
(*) At the end, I opted to use sorted(), just to ensure it, even
knowing that MAINTAINER entries are supposed to be sorted, as
the cost of sorting ~20 already-sorted entries is negligible.
---
v4:
- Dropped changes to MAINTAINERS, as other patches already
updated media and tip entries.
v3:
- Added SPDX entry to process/maintainers.rst file;
- rebased after 7.1-rc1 release.
v2:
- I placed the to MAINTAINERS changes at the beginning.
- fix a bug when O=DOCS is used;
- proper handle glob "P" entries (just in case, no profiles use it ATM);
- when SPHINXDIRS=process, instead of producing warnings, point to
entries at https://docs.kernel.org;
- MAINTAINERS parsing now happens just once;
- The output won't be numered for entries inside numered TOC trees;
- TOC tree is now hidden;
- instead of display a TOC tree, it shows a list of profiles,
ordered and named after file system name taken from MAINTAINERS file;
- At the output list, both https and file profiles are shown the same
way.
Mauro Carvalho Chehab (10):
docs: maintainers: add SPDX license to the file
docs: maintainers_include: auto-generate maintainer profile TOC
docs: auto-generate maintainer entry profile links
docs: maintainers_include: use a better title for profiles
docs: maintainers_include: add external profile URLs
docs: maintainers_include: preserve names for files under process/
docs: maintainers_include: Only show main entry for profiles
docs: maintainers_include: improve its output
docs: maintainers_include: fix support for O=dir
docs: maintainers_include: parse MAINTAINERS just once
.../maintainer/maintainer-entry-profile.rst | 24 +--
.../process/maintainer-handbooks.rst | 17 +-
Documentation/process/maintainers.rst | 2 +
Documentation/sphinx/maintainers_include.py | 161 +++++++++++++++---
4 files changed, 150 insertions(+), 54 deletions(-)
--
2.53.0
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes: > Hi Jon, > > This is basically the same patch series I sent during the merge > window, rebased on the top of post 7.1-rc1 docs-next branch. > It is tested both with and without O=DOCS. > > It contains just one extra trivial patch adding a missing SPDX > header, and, on v4, I dropped two patches touching MAINTAINERS, > as those aren't needed anymore. > > This patch series change the way maintainer entry profile links > are added to the documentation. Instead of having an entry for > each of them at an ReST file, get them from MAINTAINERS content. > > That should likely make easier to maintain, as there will be a single > point to place all such profiles. > > The output is a per-subsystem sorted (*) series of links shown as a > list like this: > > - Arm And Arm64 Soc Sub-Architectures (Common Parts) > - Arm/Samsung S3C, S5P And Exynos Arm Architectures > - Arm/Tesla Fsd Soc Support > ... > - Xfs Filesystem > > Please notice that the series is doing one logical change per patch. > I could have merged some changes altogether, but I opted doing it > in small steps to help reviews. If you prefer, feel free to merge > maintainers_include changes on merge. > > There is one interesting side effect of this series: there is no > need to add rst files containing profiles inside a TOC tree: Just > creating the file anywhere inside Documentation and adding a P entry > is enough. Adding them to a TOC won't hurt. One thing I kind of dislike about these magic mechanisms is that we end up with a single, essentially unsorted list of stuff that readers have to go digging their way through. It would be nice if we could somehow apply a bit of structure; as the number of these handbooks grows, our readers would appreciate it. Oh well, one can always hope. Meanwhile, this seems useful, I've applied it. Thanks, jon
On Sun, 03 May 2026 09:49:41 -0600
Jonathan Corbet <corbet@lwn.net> wrote:
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes:
>
> > Hi Jon,
> >
> > This is basically the same patch series I sent during the merge
> > window, rebased on the top of post 7.1-rc1 docs-next branch.
> > It is tested both with and without O=DOCS.
> >
> > It contains just one extra trivial patch adding a missing SPDX
> > header, and, on v4, I dropped two patches touching MAINTAINERS,
> > as those aren't needed anymore.
> >
> > This patch series change the way maintainer entry profile links
> > are added to the documentation. Instead of having an entry for
> > each of them at an ReST file, get them from MAINTAINERS content.
> >
> > That should likely make easier to maintain, as there will be a single
> > point to place all such profiles.
> >
> > The output is a per-subsystem sorted (*) series of links shown as a
> > list like this:
> >
> > - Arm And Arm64 Soc Sub-Architectures (Common Parts)
> > - Arm/Samsung S3C, S5P And Exynos Arm Architectures
> > - Arm/Tesla Fsd Soc Support
> > ...
> > - Xfs Filesystem
> >
> > Please notice that the series is doing one logical change per patch.
> > I could have merged some changes altogether, but I opted doing it
> > in small steps to help reviews. If you prefer, feel free to merge
> > maintainers_include changes on merge.
> >
> > There is one interesting side effect of this series: there is no
> > need to add rst files containing profiles inside a TOC tree: Just
> > creating the file anywhere inside Documentation and adding a P entry
> > is enough. Adding them to a TOC won't hurt.
>
> One thing I kind of dislike about these magic mechanisms is that we end
> up with a single, essentially unsorted list of stuff that readers have
> to go digging their way through. It would be nice if we could somehow
> apply a bit of structure; as the number of these handbooks grows, our
> readers would appreciate it.
The output is sorted by subsystem's name:
for profile, entry in sorted(maint.profile_entries.items()):
if entry.startswith("http"):
output += f"- `{profile} <{entry}>`_\n"
else:
output += f"- :doc:`{profile} <{entry}>`\n"
But yeah, as this grows, We can apply some struct there later on.
I expect that this would be good enough for "P" entries: as such entries
are used only by the biggest subsystems, I won't expect that the profiles
list would be too big.
If I'm wrong, though, changing its output is easy, as all the parsing
were done in separate: all we have to do would be to change this part.
-
Now, for the full MAINTAINERS content, I agree with you. I have
a patch series here which splits the parsing from the output,
which allows placing its contents inside a table and with a
filter javascript [1]. On my view, the output is a lot more
interesting for readers this way [2].
> Oh well, one can always hope. Meanwhile, this seems useful, I've
> applied it.
Thanks!
---
[1] On such series, I'm creating a table with two rows:
output += ".. _maintainers_table:\n\n"
output += ".. flat-table::\n"
output += " :header-rows: 1\n\n"
output += " * - Subsystem\n"
output += " - Properties\n\n"
self.state.document['maintainers_included'] = True
for name, fields in maint_parser.maint_entries.items():
output += f" * - {name}\n"
tag = "-"
for field, lines in fields.items():
field_name = maint_parser.fields.get(field, field)
output += f" {tag} :{field_name}:\n "
output += ",\n ".join(lines) + "\n"
tag = " "
output += "\n"
Which is a lot easier to read than the current output, and adding
a small javascript that allows filtering entries, based at the
contents of either subsystem or properties. That should help
readers to seek for things they're interested.
I considered ordering it by subsystems, and did some tests with that,
but at the final version I ended removing.
The main issue is that MAINTAINERS entries aren't grouped by
subsystems. Also, we don't have any field to identify to what
subsystem each entry belongs.
Using the mailing list field helps to have something close enough,
while being fast. Even so, some caveats are needed, as:
1) several entries contain multiple ML entries, which may include:
- subsystem ML;
- LKML;
- driver-specific ML;
- vendor-specific ML.
2) several entries have only LKML.
For the purpose of grouping such entries, even after filtering out LKML,
due to (1), hints are needed to try to pick subsystem ML. Perhaps the
best hint is to check if the entry is @kernel.org, which works reasonably
well. Yet, not all subsystems have its ML there.
I also considered sorting them by the number of files, using iglob
to calculate it. That would help to place the subsystem first, followed
by subsystem drivers, and this is fast enough with my nvme disks but
this could slow kernel builds on mechanical HDs.
So, I suspect that, if we want to have something more structured,
the first step would be to do some rework at the MAINTAINERS file.
[2] I need some time to check if are there any regressions
on the patch that splits the logic.
Regards,
Mauro
On Mon, 4 May 2026 09:00:41 +0200 Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote: > On Sun, 03 May 2026 09:49:41 -0600 > Jonathan Corbet <corbet@lwn.net> wrote: > > > Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes: > > > > > Hi Jon, > > > > > > This is basically the same patch series I sent during the merge > > > window, rebased on the top of post 7.1-rc1 docs-next branch. > > > It is tested both with and without O=DOCS. > > > > > > It contains just one extra trivial patch adding a missing SPDX > > > header, and, on v4, I dropped two patches touching MAINTAINERS, > > > as those aren't needed anymore. > > > > > > This patch series change the way maintainer entry profile links > > > are added to the documentation. Instead of having an entry for > > > each of them at an ReST file, get them from MAINTAINERS content. > > > > > > That should likely make easier to maintain, as there will be a single > > > point to place all such profiles. > > > > > > The output is a per-subsystem sorted (*) series of links shown as a > > > list like this: > > > > > > - Arm And Arm64 Soc Sub-Architectures (Common Parts) > > > - Arm/Samsung S3C, S5P And Exynos Arm Architectures > > > - Arm/Tesla Fsd Soc Support > > > ... > > > - Xfs Filesystem > > > > > > Please notice that the series is doing one logical change per patch. > > > I could have merged some changes altogether, but I opted doing it > > > in small steps to help reviews. If you prefer, feel free to merge > > > maintainers_include changes on merge. > > > > > > There is one interesting side effect of this series: there is no > > > need to add rst files containing profiles inside a TOC tree: Just > > > creating the file anywhere inside Documentation and adding a P entry > > > is enough. Adding them to a TOC won't hurt. > > > > One thing I kind of dislike about these magic mechanisms is that we end > > up with a single, essentially unsorted list of stuff that readers have > > to go digging their way through. Heh, perhaps you're referring to the TOC tree. You'll see it unsorted on diffs because the TOC tree there is hidden. As it is a set, currently it will output a different result on each run. Not a problem for users, but it makes harder to check differences after patches, so I'm planning to submit a patch to keep it sorted just for the sake of doing: diff -u before/ after/ Thanks, Mauro
© 2016 - 2026 Red Hat, Inc.