[PATCH 1/2] docs: maintainers_include: don't output duplicated profile entries

From: Mauro Carvalho Chehab

Date: Sun Jul 12 2026 - 11:02:05 EST


Add a logic to prevent having duplicated maintainer's profile entries
at the rst output.

Reported-by: Manuel Ebner <manuelebner@xxxxxxxxxxx>
Closes: https://lore.kernel.org/linux-doc/98a558a87a07ab641f47c66c372ee7ed0735f4f5.camel@xxxxxxxxxxx/
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
---
Documentation/sphinx/maintainers_include.py | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/Documentation/sphinx/maintainers_include.py b/Documentation/sphinx/maintainers_include.py
index dc9f9e188ffa..7df73f66e13c 100755
--- a/Documentation/sphinx/maintainers_include.py
+++ b/Documentation/sphinx/maintainers_include.py
@@ -336,16 +336,24 @@ class MaintainersProfile(Include):
# Produce a list with all maintainer profiles, sorted by subsystem name
#
output = ""
- for profile, entry in sorted(maint_parser.profile_entries.items()):
+ entries = set()
+ for profile, entry in maint_parser.profile_entries.items():
name = profile.title()

if entry.startswith("http"):
- output += f"- `{name} <{entry}>`_\n"
+ new_entry = f"- `{name} <{entry}>`_\n"
elif entry.startswith("`"):
- output += f"- {name}: {entry}\n"
+ new_entry = f"- {name}: {entry}\n"
self.warning(f"{profile}: Invalid 'P' tag: {entry}\n")
else:
- output += f"- {entry}\n"
+ new_entry = f"- {entry}\n"
+
+ if new_entry not in entries:
+ entries.add(new_entry)
+
+ for entry in sorted(entries):
+ output += entry
+

#
# Create a hidden TOC table with all profiles. That allows adding
--
2.55.0