[PATCH RFC 0/4] Auto-generate maintainer profile entries

Mauro Carvalho Chehab
2026-04-14T14:29:19Z

Hi Dan/Jon,

This small 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.

I made this as an RFC. The goal is mostly to be a start of discussions
about how this is implemented.

Also, it should be noticed that I'm not incorporating the diff
content from Dan's sugggestion, as it was just an e-mail reply without
a proper patch title/description/SoB.

Some points on this RFC:

1. some P: entries are links to web pages. The current approach
ignores them;

2. the current logic doesn't use glob. So, if one would add an
entry like:

P: Documentation/foo/profiles-*.rst

it will generate an entry like "../foo/profiles-*".

This probably works, as toc trees accept glob.

3. entries are placed at the order they occur at MAINTAINERS
file (but duplication is properly handled);

4. as Randy mentioned, if an entry there is inside another TOC
using numeration, those entries will have numeration as well;

5. the approach I took on patch 1 was a little bit lazy, as it
ends processing MAINTAINERS two times, and there are some code
duplication on different classes to handle path. I opted to do
this way to minimize the differences, but it makes sense to
clean the code later on newer versions of this series or after
applying it;

6. patches 2 and 3 can be applied independently of this approach.
They just add two missing "P:" entries to MAINTAINERS.

Suggested-by: Dan Williams <djbw@kernel.org>
Closes: https://lore.kernel.org/linux-doc/69dd6299440be_147c801005b@djbw-dev.notmuch/

Mauro Carvalho Chehab (4):
docs: maintainers_include: auto-generate maintainer profile TOC
MAINTAINERS: add an entry for media maintainers profile
MAINTAINERS: add maintainer-tip.rst to X86
docs: auto-generate maintainer entry profile links

.../maintainer/maintainer-entry-profile.rst | 17 +---
.../process/maintainer-handbooks.rst | 10 +-
Documentation/sphinx/maintainers_include.py | 93 +++++++++++++++----
MAINTAINERS | 2 +
4 files changed, 81 insertions(+), 41 deletions(-)

--
2.52.0