From nobody Wed Jun 17 06:02:53 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D98323BED2B; Mon, 27 Apr 2026 13:00:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294817; cv=none; b=quGXts+lfP7qWsRdK0eOPsRygv/TjmA42yKurbHHcADx6o/7kcta0Hih8idXlw2PD6ipo2ZYa8ZQE3lwviTJYvwgTDv6VaK5PK9hXNPUK+6VJHmLKgWKg/p1q8xlpFgwsEQEoxmrCJ/nDAO/pb4CCoTkWF49fPnftZlA+1s/GbI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294817; c=relaxed/simple; bh=k5dWurVipop77C9Fwrcn3SH5CnWId05jQgVrC5N7Hi8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bbV1fTbPwokRrnePZRyKJglz2J+XxdGKYRwTDtjqXxMU1/hSpm8pwkwrm+gyy21RQeu2ZAdNuG6FSRmSOMEtEIDulVibk6MMoraFf4oC2V3IU8rRVPwXI/0wegx6AvQsnxW3j25V/Za3AhhzAfWxnkT4ZjSWMuP0rFnBLLoZ4Zk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iSTNgTZX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iSTNgTZX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F244C2BCB5; Mon, 27 Apr 2026 13:00:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777294817; bh=k5dWurVipop77C9Fwrcn3SH5CnWId05jQgVrC5N7Hi8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iSTNgTZXGI+uUUNL91x9OsOC8O60kF6yTDlOyEuGD3GJzqmMDwxc3+URWujmAnAUo dN+ZFD4HUOPEkunQpNILPwNjWa/oalHijUfxkev0LT4tZ+iH64ovHu7oSxvWCHOW92 srzUsly1Q+N0tziUJH2kWJmk4xsoS8wVcJITH68exfKp4w6saCov7zSOi69Bd1TVms /5KwBnH4X2TkvZrioN/n6lfYlc3GaCBSQKYjKWilxsggJr1guRhpD7ucAOGK+9jQS7 3dkIpBtc8S/jlZFLvur4dFhiKgybTWg9Kf8X5Omgn41CgoVAVK846rHnOudnj0bIns ZBe1hlcSvenvg== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wHLZP-0000000Bx2P-2ec6; Mon, 27 Apr 2026 15:00:15 +0200 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, workflows@vger.kernel.org, Randy Dunlap Subject: [PATCH v3 01/12] MAINTAINERS: add an entry for media maintainers profile Date: Mon, 27 Apr 2026 15:00:01 +0200 Message-ID: <34aaa9258c783a05528fbad2beba69e070c3caad.1777294623.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab The media subsystem has a maintainers entry profile, but its entry is missing at MAINTAINERS. Add it. Acked-by: Randy Dunlap Signed-off-by: Mauro Carvalho Chehab Message-ID: <5af4aa6a716228eea4d59dc26b97d642e1e7d419.1776176108.git.mcheha= b+huawei@kernel.org> Reported-by: Randy Dunlap Suggested-by: Dan Williams --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2fb1c75afd16..f52ec50f6d10 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16223,6 +16223,7 @@ P: Documentation/driver-api/media/maintainer-entry-= profile.rst W: https://linuxtv.org Q: https://patchwork.linuxtv.org/project/linux-media/list/ T: git git://linuxtv.org/media.git +P: Documentation/driver-api/media/maintainer-entry-profile.rst F: Documentation/admin-guide/media/ F: Documentation/devicetree/bindings/media/ F: Documentation/driver-api/media/ --=20 2.53.0 From nobody Wed Jun 17 06:02:53 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D97A43BED27; Mon, 27 Apr 2026 13:00:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294817; cv=none; b=Sr7EVSMcQRGUYMyxMiZWHc6gcrln6g5xZmQrzn+dHHuF3LBkUzuyV1ekw6sUGmcAcstnP64vHpdLRASYWUwrY0zA6/T8M7nRzqfw2sMKQB6UfgZyWiZ612vrGnNmUPf8/8MZSMRZWXo6HtNlNujg1VWSG2/3AbDXK6OUeTC44SQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294817; c=relaxed/simple; bh=0/HTY/j+rmONwTz1eYmFn0WIHlokjtE9NUEt4Mkvjgs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=db6xq4IdXBc4xFXGEiBgZyv/SpwaCLKnxQcKDOZl+Tiq8dSaIgo30VRQuHuQLlPHmz4ThwOqziiMLfPFg+ZYeejVyGKiSTcSpAUKpNBwBLgVkWUgwiyfqQUEuCkaIlq6lzHLPLRFYpRpVJ6U55U1ctvm256mjnrP3PWJLnmABOY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KAQj93gU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KAQj93gU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A927AC2BCB7; Mon, 27 Apr 2026 13:00:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777294817; bh=0/HTY/j+rmONwTz1eYmFn0WIHlokjtE9NUEt4Mkvjgs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KAQj93gU9gv34gCWYtb+46HC164jS3Pwxjkh3KDzL0QLYF4OHM7CeLKz/24t6pjIP u+ADvE4XQNKCuFyN2UZ9I4wwdgZpUnO6tM2rLUI/gcUnZD/RR3vzj9j8KnS6PGDGVU 5bpHW2BQpBIfeshvd9r5w77kdPxTNW/JIy4b4xQ9UOlnFi8s/HsUKj6t43tPUC4hYj 0wYlp0IL2fq0Ay9zJF4CArWOEQXoKUanKSaQ271IV+gbDP9gEYBGfnvPukbdv4zrIa oosOoAn/bmpfiOamjAw7pyg3HInwZ6KhhlAZJlzb/cpf4p/3rnBAnaYJq/FLLxUxu2 nLWCdLEbtWonQ== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wHLZP-0000000Bx3c-3MzY; Mon, 27 Apr 2026 15:00:15 +0200 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, workflows@vger.kernel.org, Randy Dunlap , Dan Williams Subject: [PATCH v3 02/12] MAINTAINERS: add maintainer-tip.rst to X86 Date: Mon, 27 Apr 2026 15:00:02 +0200 Message-ID: <35abbf65385910c4c69d571dbf0d10b2a75b6fa9.1777294623.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab The X86 subsystem has a maintainers entry profile, but its entry is missing at MAINTAINERS. Add it. Acked-by: Randy Dunlap Acked-by: Dan Williams Signed-off-by: Mauro Carvalho Chehab Message-ID: <970434c647aa1e1e9a81c87b4d5fed934d4018a7.1776176108.git.mcheha= b+huawei@kernel.org> Reported-by: Randy Dunlap Suggested-by: Dan Williams --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index f52ec50f6d10..a00d4ba61c2a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -28808,6 +28808,7 @@ M: Ingo Molnar M: Borislav Petkov M: Dave Hansen M: x86@kernel.org +P: Documentation/process/maintainer-tip.rst R: "H. Peter Anvin" L: linux-kernel@vger.kernel.org S: Maintained --=20 2.53.0 From nobody Wed Jun 17 06:02:53 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE51E3BE65F; Mon, 27 Apr 2026 13:00:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294818; cv=none; b=Wi5GfT7E3pi9X1lVA/zrAYKHRHKdZ7BZ1T0MwSwa6cr9pWjNKne5oVNC4yA3pDHLxg2oAR3lWwSlhvuFzQm1yqHEti4d/ruoqoU4ufgRHVmpWx5Y4oxcRmKx+XLCilMI+Ed6jmDOTAOMnCpfrjjPZajbTmMKoDxiBD4BLZAvvKs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294818; c=relaxed/simple; bh=oCSFDjePyMaj2tf0ATqd8TtAxNzPuU0qXsi2GNKPtg0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Y0L3+rgAm09q+A0y8QJ3yw0e2/7rlSePlY2Qws8xiJMUU+Een+LbFbrts5VN+bF2E8guJvv5wCP0PYuyk/SN4EJ663verL6baxvHw5G1JTHvKJOubgcsh0Gt6/4WdASS1bg6p6blj7Jz6AjegI88xW9CT8toJpp/WNUdojYZLCw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oySn7+FC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oySn7+FC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE8F2C2BCC9; Mon, 27 Apr 2026 13:00:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777294817; bh=oCSFDjePyMaj2tf0ATqd8TtAxNzPuU0qXsi2GNKPtg0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oySn7+FCcN5qOKEJWRR/IPvZYWjwWsoyKy2nv2kxiOkA3EnXYlHHRkq5y7Z0u/TQq m3CsLFU7hADLzfgawL3/XRmaOW4PYgEkrt19482CxOdZAE7k2pIvoH+uTAQWqK2n+M JzWNf69uhLBLtGm2kVYAxnjXwbxgLdFPVi8lX/M+CStkkBsSC7W87MRljkmArkiYYj kBijZJHWh8LeNk297oa/Ox8RztwuVIf9uW7snv1W5bqb27KT19xXiJBAH5mss8JD5+ E++9oZwxXOczfMeb+CQayKNNTcUIobw1wZdEiJDylNOtn3N+LJKZM8i96GXk4lMAWK OlaT09682coKQ== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wHLZP-0000000Bx4q-45Ck; Mon, 27 Apr 2026 15:00:15 +0200 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, workflows@vger.kernel.org, Shuah Khan Subject: [PATCH v3 03/12] docs: maintainers: add SPDX license to the file Date: Mon, 27 Apr 2026 15:00:03 +0200 Message-ID: <527f6ebe5c0831e92b26a63d3f9b06ed735bb62a.1777294623.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab While this file is really trivial, add a SPDX license line on it. Signed-off-by: Mauro Carvalho Chehab Reported-by: Randy Dunlap Suggested-by: Dan Williams --- Documentation/process/maintainers.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/process/maintainers.rst b/Documentation/process/= maintainers.rst index 6174cfb4138f..5d1b1464c3ae 100644 --- a/Documentation/process/maintainers.rst +++ b/Documentation/process/maintainers.rst @@ -1 +1,3 @@ +.. SPDX-License-Identifier: GPL-2.0 + .. maintainers-include:: --=20 2.53.0 From nobody Wed Jun 17 06:02:53 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE4813BE650; Mon, 27 Apr 2026 13:00:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294818; cv=none; b=tcMqA3JrLc0581tjcX2tACpy+SU4OcIu0HDTQw5e11I1LbI/S6OGKAHcXYCMEMFvhPIEPOuhZp3xV9RlTqqjkDbMRqEzU4nAv7knUG4iN0Qb3cenh7Xx75C/2pL11YMw/8ww6ZL5X1LgElj9MexQkS104QiulUAOQ0Lp4JL+pac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294818; c=relaxed/simple; bh=lpFijLl6DOvM61uAD6IUooTPFM8/pj/MpyljGy4dY4Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eKcoZUlXeEqXPj7miKO+P3eIoskUFC2fGT8JIXZXS0nroeKF6uHZ5peibO300UgeW8Ci1Tr8HVCUCXH61xzi5DR6+qY2y4SqMT42vHXRwHY3NU63unh2GKLdIZK6ojlBggQXXo+LPJZ1/QLvKcvzTohXTYAm6JXJ2iQIVB8eIgc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XMOjI7j/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XMOjI7j/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDFAEC2BCC6; Mon, 27 Apr 2026 13:00:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777294817; bh=lpFijLl6DOvM61uAD6IUooTPFM8/pj/MpyljGy4dY4Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XMOjI7j/8ZERzru9oYBP3Zaa/sATO57PxxwymbtFkT7F1zwZfvadT9fEsanPC6GVy mhwjjGplAp4kJ6ou6BrJEL4AWP8HrpmE4TPXq24iGow6Uf7ACllGsMae4KuaOtqzCe ed5DaFcl5Qk9v1uJQuqfCP/7PwBVS8MnSPyBqCWCFDB7Z2mI/XNFQNo8Wp8oVZQSFg V1x5sHf+wvBvuW5yN6GPNCMYhdQtDquF9dKel0AL/pMxjtuHWi4+FyBobV6gGgSVDf ciHYycSmGFBYKW/Q98lZX1lUSsXh1HjxPYO74CwESmIBIP3m3Kyp9DAfQBbaccpZoc ePAUeKuPdKOXg== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wHLZQ-0000000Bx63-0b7o; Mon, 27 Apr 2026 15:00:16 +0200 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List , Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, workflows@vger.kernel.org, Shuah Khan , Dan Williams Subject: [PATCH v3 04/12] docs: maintainers_include: auto-generate maintainer profile TOC Date: Mon, 27 Apr 2026 15:00:04 +0200 Message-ID: <627f5455f6a1bc114346f04a09f5d06253ac0b98.1777294623.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Add a feature to allow auto-generating media entry profiles from the corresponding field inside MAINTAINERS file(s). Suggested-by: Dan Williams Closes: https://lore.kernel.org/linux-doc/69dd6299440be_147c801005b@djbw-de= v.notmuch/ Acked-by: Dan Williams Signed-off-by: Mauro Carvalho Chehab Message-ID: <4e9512a3d05942c98361d06d60a118d7c78762b6.1776176108.git.mcheha= b+huawei@kernel.org> Reported-by: Randy Dunlap --- Documentation/sphinx/maintainers_include.py | 93 +++++++++++++++++---- 1 file changed, 76 insertions(+), 17 deletions(-) diff --git a/Documentation/sphinx/maintainers_include.py b/Documentation/sp= hinx/maintainers_include.py index 519ad18685b2..1dac83bf1a65 100755 --- a/Documentation/sphinx/maintainers_include.py +++ b/Documentation/sphinx/maintainers_include.py @@ -21,6 +21,8 @@ import sys import re import os.path =20 +from textwrap import indent + from docutils import statemachine from docutils.parsers.rst import Directive from docutils.parsers.rst.directives.misc import Include @@ -30,20 +32,11 @@ def ErrorString(exc): # Shamelessly stolen from docuti= ls =20 __version__ =3D '1.0' =20 -def setup(app): - app.add_directive("maintainers-include", MaintainersInclude) - return dict( - version =3D __version__, - parallel_read_safe =3D True, - parallel_write_safe =3D True - ) +class MaintainersParser: + """Parse MAINTAINERS file(s) content""" =20 -class MaintainersInclude(Include): - """MaintainersInclude (``maintainers-include``) directive""" - required_arguments =3D 0 - - def parse_maintainers(self, path): - """Parse all the MAINTAINERS lines into ReST for human-readability= """ + def __init__(self, base_path, path): + self.profiles =3D list() =20 result =3D list() result.append(".. _maintainers:") @@ -78,6 +71,12 @@ class MaintainersInclude(Include): # Drop needless input whitespace. line =3D line.rstrip() =20 + match =3D re.match(r"P:\s*(Documentation/\S+)\.rst", line) + if match: + fname =3D os.path.relpath(match.group(1), base_path) + if fname not in self.profiles: + self.profiles.append(fname) + # Linkify all non-wildcard refs to ReST files in Documentation= /. pat =3D r'(Documentation/([^\s\?\*]*)\.rst)' m =3D re.search(pat, line) @@ -165,12 +164,23 @@ class MaintainersInclude(Include): for separated in field_content.split('\n'): result.append(separated) =20 - output =3D "\n".join(result) + self.output =3D "\n".join(result) + + # Create a TOC class + +class MaintainersInclude(Include): + """MaintainersInclude (``maintainers-include``) directive""" + required_arguments =3D 0 + + def emit(self, base_path, path): + """Parse all the MAINTAINERS lines into ReST for human-readability= """ + + output =3D MaintainersParser(base_path, path).output + # For debugging the pre-rendered results... #print(output, file=3Dopen("/tmp/MAINTAINERS.rst", "w")) =20 - self.state_machine.insert_input( - statemachine.string2lines(output), path) + self.state_machine.insert_input(statemachine.string2lines(output),= path) =20 def run(self): """Include the MAINTAINERS file as part of this reST file.""" @@ -186,12 +196,61 @@ class MaintainersInclude(Include): =20 # Append "MAINTAINERS" path =3D os.path.join(path, "MAINTAINERS") + base_path =3D os.path.dirname(self.state.document.document.current= _source) =20 try: self.state.document.settings.record_dependencies.add(path) - lines =3D self.parse_maintainers(path) + lines =3D self.emit(base_path, path) except IOError as error: raise self.severe('Problems with "%s" directive path:\n%s.' % (self.name, ErrorString(error))) =20 return [] + +class MaintainersProfile(Include): + required_arguments =3D 0 + + def emit(self, base_path, path): + """Parse all the MAINTAINERS lines looking for profile entries""" + + profiles =3D MaintainersParser(base_path, path).profiles + + output =3D ".. toctree::\n" + output +=3D " :maxdepth: 2\n\n" + output +=3D indent("\n".join(profiles), " ") + + self.state_machine.insert_input(statemachine.string2lines(output),= path) + + def run(self): + """Include the MAINTAINERS file as part of this reST file.""" + if not self.state.document.settings.file_insertion_enabled: + raise self.warning('"%s" directive disabled.' % self.name) + + # Walk up source path directories to find Documentation/../ + path =3D self.state_machine.document.attributes['source'] + path =3D os.path.realpath(path) + tail =3D path + while tail !=3D "Documentation" and tail !=3D "": + (path, tail) =3D os.path.split(path) + + # Append "MAINTAINERS" + path =3D os.path.join(path, "MAINTAINERS") + base_path =3D os.path.dirname(self.state.document.document.current= _source) + + try: + self.state.document.settings.record_dependencies.add(path) + lines =3D self.emit(base_path, path) + except IOError as error: + raise self.severe('Problems with "%s" directive path:\n%s.' % + (self.name, ErrorString(error))) + + return [] + +def setup(app): + app.add_directive("maintainers-include", MaintainersInclude) + app.add_directive("maintainers-profile-toc", MaintainersProfile) + return dict( + version =3D __version__, + parallel_read_safe =3D True, + parallel_write_safe =3D True + ) --=20 2.53.0 From nobody Wed Jun 17 06:02:53 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EC593C0621; Mon, 27 Apr 2026 13:00:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294818; cv=none; b=HWz7F7xVU7zatO+Qoch66Jrjr1ALNXBWoLrUlZJZpudhkmEzLVeRLVmbAoojbX0GAS0FaDX3dAJVbv1daPPLaZN7JOhkeaCBeJz4lo+EloIA3Bybq1+CFARHPAoz2QbVx4HcXzOz1fubi7MA03uBSBK8kwEIKijmijyGT7OAmc8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294818; c=relaxed/simple; bh=etykI6PjHqrvsDMvEbWFzTQyXVYcIo7uusJigHM5MX8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=fYOYS9W4Y0hkuYVLB01npuTO0CnFujmYChYXEliRBC3jdsfusXOXlXM6oLYGRiuRFNTpZdtMwQJthJ12FEgJoCAdR6p2efLlSJbwnsB8o59vGXi78JoWGpeglZ3khO81w3OcKJuz147yadLWMjdmIIToUZYXvBioWBz7i0vultI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Zx9BT0wl; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Zx9BT0wl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09108C19425; Mon, 27 Apr 2026 13:00:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777294818; bh=etykI6PjHqrvsDMvEbWFzTQyXVYcIo7uusJigHM5MX8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zx9BT0wlxngKZjI3y5VcJopmuEnB3Eqp+/fvPqzrJJHuKMPatosDWg3jfsttdMwup VaCv782lIQqTt6oCpfTnaAQ/KfNVhDV6dZr4lkGBCeDslcKP7btKzx7IIi2/XouXn/ xd8KvyXUBLLRnU0QiEjPKjJo+yYXHvxcwA0M1SxxYqOI2++eljogWP7zgDfvgS451v sURn1WbYU50BWH2V5jHA2fvhOTXvKyaqlhk47xtxo/CedI8owHLXQx5cg93lB66TNs RMO/GJSXlroYV4/FZ95/Ae8QSinCdMvB+SAXJVVBK/cLtnXB/Ahv1JPByUj0tAQdWa gFinKJ0UqDvCg== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wHLZQ-0000000Bx7G-1Jfu; Mon, 27 Apr 2026 15:00:16 +0200 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, workflows@vger.kernel.org, Albert Ou , Alexandre Ghiti , Palmer Dabbelt , Paul Walmsley , Shuah Khan , Dan Williams Subject: [PATCH v3 05/12] docs: auto-generate maintainer entry profile links Date: Mon, 27 Apr 2026 15:00:05 +0200 Message-ID: X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Instead of manually creating a TOC tree for them, use the new tag to auto-generate its TOC. Co-developed-by: Dan Williams Signed-off-by: Dan Williams Signed-off-by: Mauro Carvalho Chehab Message-ID: <9228f77b0339b8e5dea4a201ab6d4feb30cef5c2.1776176108.git.mcheha= b+huawei@kernel.org> Reported-by: Randy Dunlap Suggested-by: Dan Williams --- .../maintainer/maintainer-entry-profile.rst | 24 ++++--------------- .../process/maintainer-handbooks.rst | 19 ++++++++------- 2 files changed, 14 insertions(+), 29 deletions(-) diff --git a/Documentation/maintainer/maintainer-entry-profile.rst b/Docume= ntation/maintainer/maintainer-entry-profile.rst index 6020d188e13d..58e2af333692 100644 --- a/Documentation/maintainer/maintainer-entry-profile.rst +++ b/Documentation/maintainer/maintainer-entry-profile.rst @@ -92,24 +92,8 @@ full series, or privately send a reminder email. This se= ction might also list how review works for this code area and methods to get feedback that are not directly from the maintainer. =20 -Existing profiles ------------------ +Maintainer Handbooks +-------------------- =20 -For now, existing maintainer profiles are listed here; we will likely want -to do something different in the near future. - -.. toctree:: - :maxdepth: 1 - - ../doc-guide/maintainer-profile - ../nvdimm/maintainer-entry-profile - ../arch/riscv/patch-acceptance - ../process/maintainer-soc - ../process/maintainer-soc-clean-dts - ../driver-api/media/maintainer-entry-profile - ../process/maintainer-netdev - ../driver-api/vfio-pci-device-specific-driver-acceptance - ../nvme/feature-and-quirk-policy - ../filesystems/nfs/nfsd-maintainer-entry-profile - ../filesystems/xfs/xfs-maintainer-entry-profile - ../mm/damon/maintainer-profile +For examples of other subsystem handbooks see +Documentation/process/maintainer-handbooks.rst. diff --git a/Documentation/process/maintainer-handbooks.rst b/Documentation= /process/maintainer-handbooks.rst index 3d72ad25fc6a..531985a0fae8 100644 --- a/Documentation/process/maintainer-handbooks.rst +++ b/Documentation/process/maintainer-handbooks.rst @@ -7,14 +7,15 @@ The purpose of this document is to provide subsystem spec= ific information which is supplementary to the general development process handbook :ref:`Documentation/process `. =20 +For developers, see below for all the known subsystem specific guides. +If the subsystem you are contributing to does not have a guide listed +here, it is fair to seek clarification of questions raised in +Documentation/maintainer/maintainer-entry-profile.rst. + +For maintainers, consider documenting additional requirements and +expectations if submissions routinely overlook specific submission +criteria. See Documentation/maintainer/maintainer-entry-profile.rst. + Contents: =20 -.. toctree:: - :numbered: - :maxdepth: 2 - - maintainer-netdev - maintainer-soc - maintainer-soc-clean-dts - maintainer-tip - maintainer-kvm-x86 +.. maintainers-profile-toc:: --=20 2.53.0 From nobody Wed Jun 17 06:02:53 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D0FC3C1977; Mon, 27 Apr 2026 13:00:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294818; cv=none; b=JdR74Ah/bilQZIV3HyZpKxzmfM6cfsVWs2PIqAY2xoiVp9a37v2u0RH5hGFAMgYOEaPcQPbQ6RkWZdiR1kEmKIxshSwyo8lO583+F2L3rG8YqjjkOKnjj0JfV18SDEmm39tHThXMh6sW0RZKHlLLiJMywsGts+lP0ZqT3MLHD1A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294818; c=relaxed/simple; bh=NuYk28Zg9NLnbQ4d/3en1YVQRZ/qBlcvUunSiLU9FFk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Ugot85fSzuYO8oe4rv3Mjmz5NbnYePP3YlEzLz7phppJ/q/QRpMOwuvmwpGdxrrCi3LIpnxgOUEBSTu0mJSKvn6AhtpABRwJcah+8OmNwUz2qaYnP/u1yhY9s5tz2YlDSDLCORd9Cv+k3n6rkXyTdQkdAvM9Y+EwNBMCrqWla8U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fgSQESTL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fgSQESTL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AD06C2BCF4; Mon, 27 Apr 2026 13:00:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777294818; bh=NuYk28Zg9NLnbQ4d/3en1YVQRZ/qBlcvUunSiLU9FFk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fgSQESTLs4k+VUkrMZRFkZyhpA0f85vR/s1SWwaInt9wkfoJsREPVHpUAKacAiVsN YrhXym4fuWQRavY7SY7o3DleT842Uf2hhg2j934NiBGjTMpddGXJnhnJ96/d7Mhy4W jTy3Q/xu/we0mdrtja2JvcQ19Ohuo84A0IShkuId4jrMIQX2QClmuLEX4nNytQNUp4 JYYBsOXy/A5SkvlCSuBukhnz8oSnmrDC5vaDx3UnXs/0Gl1V1FQS9GiKI2THNLm+rT bhLFBi3UZWddTCDarTbVtVyYidASUx9YFrzNM+vzKpTMdmPK2mD3/hW1OTfzW6hmaL CQB9EfOUH0BGA== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wHLZQ-0000000Bx8T-22Ip; Mon, 27 Apr 2026 15:00:16 +0200 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List , Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, workflows@vger.kernel.org, Shuah Khan Subject: [PATCH v3 06/12] docs: maintainers_include: use a better title for profiles Date: Mon, 27 Apr 2026 15:00:06 +0200 Message-ID: <579bc4faf7681bebd71ce373a7d78a96d4f0fedc.1777294623.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab As we're picking the name of the subsystem from MAINTAINERS, also use its subsystem name for the titles. Signed-off-by: Mauro Carvalho Chehab Reported-by: Randy Dunlap Suggested-by: Dan Williams --- Documentation/sphinx/maintainers_include.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Documentation/sphinx/maintainers_include.py b/Documentation/sp= hinx/maintainers_include.py index 1dac83bf1a65..cf428db7599c 100755 --- a/Documentation/sphinx/maintainers_include.py +++ b/Documentation/sphinx/maintainers_include.py @@ -36,7 +36,7 @@ class MaintainersParser: """Parse MAINTAINERS file(s) content""" =20 def __init__(self, base_path, path): - self.profiles =3D list() + self.profiles =3D {} =20 result =3D list() result.append(".. _maintainers:") @@ -54,6 +54,7 @@ class MaintainersParser: prev =3D None field_prev =3D "" field_content =3D "" + subsystem_name =3D None =20 for line in open(path): # Have we reached the end of the preformatted Descriptions tex= t? @@ -75,7 +76,10 @@ class MaintainersParser: if match: fname =3D os.path.relpath(match.group(1), base_path) if fname not in self.profiles: - self.profiles.append(fname) + if self.profiles.get(fname) is None: + self.profiles[fname] =3D subsystem_name + else: + self.profiles[fname] +=3D f", {subsystem_name}" =20 # Linkify all non-wildcard refs to ReST files in Documentation= /. pat =3D r'(Documentation/([^\s\?\*]*)\.rst)' @@ -112,6 +116,8 @@ class MaintainersParser: output =3D field_content + "\n\n" field_content =3D "" =20 + subsystem_name =3D line.title() + # Collapse whitespace in subsystem name. heading =3D re.sub(r"\s+", " ", line) output =3D output + "%s\n%s" % (heading, "~" * len(hea= ding)) @@ -217,7 +223,13 @@ class MaintainersProfile(Include): =20 output =3D ".. toctree::\n" output +=3D " :maxdepth: 2\n\n" - output +=3D indent("\n".join(profiles), " ") + + items =3D sorted(profiles.items(), key=3Dlambda kv: (kv[1] or "", = kv[0])) + for fname, profile in items: + if profile: + output +=3D f" {profile} <{fname}>\n" + else: + output +=3D f" {fname}\n" =20 self.state_machine.insert_input(statemachine.string2lines(output),= path) =20 --=20 2.53.0 From nobody Wed Jun 17 06:02:53 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 996D93C1991; Mon, 27 Apr 2026 13:00:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294818; cv=none; b=Nkdr0hoNxhLDOu3/l7pZE03KoG1Bw1a2ZGqsYAsOFbbHyMWppXcHwV/lcw8QLJR3O7rBbz26VSnrNJOYOAb3H+Lz9UG5n7waSATjXSY0mAJeQTDDV5/nzK7qtoaTUhGurOPPIGfjdeLYiyOL6+SjGnNnaQf7WLkx+2SBSPn8fEw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294818; c=relaxed/simple; bh=PN4FPVYRORp3XTpdvjjtDtB0ZIfuMMKyf0YVAqRdNAs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=EvaBK2UKmsHk1pwmUgFNych/F/54X8bfr9KWCMu5AipwmQxe4U74yQ+bbQiBSshUT6X/RCQycAixhrS76V5ObTRuC39jRy88uCtONvw3N7j8GdJUXiEfBF43N+Y7eX2c6Db+9KczvSS8RPVgRcJA9EWZ/XIi8+e6+U8di1L5CHE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=f67TXgqg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="f67TXgqg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F7F0C2BCB7; Mon, 27 Apr 2026 13:00:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777294818; bh=PN4FPVYRORp3XTpdvjjtDtB0ZIfuMMKyf0YVAqRdNAs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f67TXgqg4zjIJXENGzkvz4GYvaiC4BnkIHchingFfznXrPsjIsst3PnS4JJM6TMU6 lr0I6L2NkyapP2M2oaEzOt4QAxLCsf6hMNffZdI/gk2xsoXJJd+/LyABHdtETjAZKz CaetEIpb/VpaGEycmkr0WEXi13ALVnvNFxaCKM7IZS7uS3s4wNb5K4ITsU3rTNy3Db rK7FxGyf+M3j9RLpinBI3pulSNPiC5XE/I/0AY04guqc7b4jA2zniQZaEPZOWYmNqe X+yS3ZQE07hSdiQN/SDpWqd+jly9Vud05bLYqUyaYeVgvhsltb0LP+1LiDsM8hCJAr M5UvBvigcK8kg== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wHLZQ-0000000Bx9g-2kW1; Mon, 27 Apr 2026 15:00:16 +0200 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List , Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, workflows@vger.kernel.org, Shuah Khan Subject: [PATCH v3 07/12] docs: maintainers_include: add external profile URLs Date: Mon, 27 Apr 2026 15:00:07 +0200 Message-ID: <753dd27fbab209fc1b87862bd6204b2026a85313.1777294623.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Some subsystem profiles are maintained elsewhere. Add them to the output. Signed-off-by: Mauro Carvalho Chehab Reported-by: Randy Dunlap Suggested-by: Dan Williams --- Documentation/sphinx/maintainers_include.py | 28 +++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/Documentation/sphinx/maintainers_include.py b/Documentation/sp= hinx/maintainers_include.py index cf428db7599c..f1b8d4b00c2a 100755 --- a/Documentation/sphinx/maintainers_include.py +++ b/Documentation/sphinx/maintainers_include.py @@ -37,6 +37,7 @@ class MaintainersParser: =20 def __init__(self, base_path, path): self.profiles =3D {} + self.profile_urls =3D {} =20 result =3D list() result.append(".. _maintainers:") @@ -81,6 +82,16 @@ class MaintainersParser: else: self.profiles[fname] +=3D f", {subsystem_name}" =20 + match =3D re.match(r"P:\s*(https?://.*)", line) + if match: + url =3D match.group(1).strip() + if url not in self.profile_urls: + if self.profile_urls.get(url) is None: + self.profile_urls[url] =3D subsystem_name + else: + self.profile_urls[url] +=3D f", {subsystem_name}" + + # Linkify all non-wildcard refs to ReST files in Documentation= /. pat =3D r'(Documentation/([^\s\?\*]*)\.rst)' m =3D re.search(pat, line) @@ -219,18 +230,31 @@ class MaintainersProfile(Include): def emit(self, base_path, path): """Parse all the MAINTAINERS lines looking for profile entries""" =20 - profiles =3D MaintainersParser(base_path, path).profiles + maint =3D MaintainersParser(base_path, path) =20 output =3D ".. toctree::\n" output +=3D " :maxdepth: 2\n\n" =20 - items =3D sorted(profiles.items(), key=3Dlambda kv: (kv[1] or "", = kv[0])) + items =3D sorted(maint.profiles.items(), + key=3Dlambda kv: (kv[1] or "", kv[0])) for fname, profile in items: if profile: output +=3D f" {profile} <{fname}>\n" else: output +=3D f" {fname}\n" =20 + output +=3D "\n**External profiles**\n\n" + + items =3D sorted(maint.profile_urls.items(), + key=3Dlambda kv: (kv[1] or "", kv[0])) + for url, profile in items: + if profile: + output +=3D f"- {profile} <{url}>\n" + else: + output +=3D f"- {url}\n" + + output +=3D "\n" + self.state_machine.insert_input(statemachine.string2lines(output),= path) =20 def run(self): --=20 2.53.0 From nobody Wed Jun 17 06:02:53 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4CAA3BED37; Mon, 27 Apr 2026 13:00:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294818; cv=none; b=f1LRqkpLBclqRaTs4R0vv6oPz2GYEZvAvWU7UiydZ5OFbDBtkFiuZQZh3yahPAoD8+qDipOuaaOu0OaLOrOOtP2g8+vvKvOluMJ+cK18Sb2QfH8c4WDMaIX3scZP26FpOqw3g+Rj7RcylnZV2lEUGiNxl/Fu8qN8U3DATG5iDq8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294818; c=relaxed/simple; bh=4mjLTBn9APgLWMeXtSLp7kqR2oEmNfSkkkBNyyYhQPs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Fl7XBT+loA7RTzghVBpTxgTSV6fr2Xs4fDzSiNG8yKm6U8D9ABwK/3HRGKoKcm68I4+aOBirDDUz/SBeU+SZGcNuhccCnl5WZS75LPca5loBvJwLwkXp/HyhYNlOzUku5H6qSyhVJf9lGVcDQ9gMFZtATm6xRyzeRYUHANvJNmU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mdWO0xm3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mdWO0xm3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F15AC2BCC9; Mon, 27 Apr 2026 13:00:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777294818; bh=4mjLTBn9APgLWMeXtSLp7kqR2oEmNfSkkkBNyyYhQPs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mdWO0xm3B3QkY5C0zz71ViWphwLS6IdHv/vswRFL3bvIczBaTYTj6RuXoTBsThL7Z W1/cxV8uZLfWfgtnIlwa1C5fNTZSHciiQCkoCgu1n8c8fKPbq6F7A7mF1eWCalRSme havptakztxfPnnMXQWGxjKO/UFDadHPPAuFbvtS9naJPY9XnCm4rjwmwUIv7VMhWPx snM8MRw0tgH65iCjUyLnSzHwCRleSIfF5ss52EzqYJ02RbIYXTjx/jJBfq9o2474DG 1Io5wHxwLcn/FlZGaiarL5mo1TpZb5oU8d5moPaM5XEnUSQ1D9Q18MUC5LXUaicvXa KJnsz0hXRn14A== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wHLZQ-0000000BxAt-3Tau; Mon, 27 Apr 2026 15:00:16 +0200 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List , Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, workflows@vger.kernel.org, Shuah Khan Subject: [PATCH v3 08/12] docs: maintainers_include: preserve names for files under process/ Date: Mon, 27 Apr 2026 15:00:08 +0200 Message-ID: <44165bb12641055e4ecadb2ba95fde36fb46ff86.1777294623.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab When a maintainer's profile is stored outside process, they're already included on some other book and the name of the filesystem may not be there. That's why the logic picks the name from the subsystem's name. However, files directly placed together with maintainers-handbooks.rst (e.g. under Documentation/process/) is a different history: those aren't placed anywhere, so we can keep using their own names, letting Sphinx do his thing. Signed-off-by: Mauro Carvalho Chehab Reported-by: Randy Dunlap Suggested-by: Dan Williams --- Documentation/sphinx/maintainers_include.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/sphinx/maintainers_include.py b/Documentation/sp= hinx/maintainers_include.py index f1b8d4b00c2a..948746b998a3 100755 --- a/Documentation/sphinx/maintainers_include.py +++ b/Documentation/sphinx/maintainers_include.py @@ -76,11 +76,13 @@ class MaintainersParser: match =3D re.match(r"P:\s*(Documentation/\S+)\.rst", line) if match: fname =3D os.path.relpath(match.group(1), base_path) - if fname not in self.profiles: + if fname.startswith("../"): if self.profiles.get(fname) is None: self.profiles[fname] =3D subsystem_name else: self.profiles[fname] +=3D f", {subsystem_name}" + else: + self.profiles[fname] =3D None =20 match =3D re.match(r"P:\s*(https?://.*)", line) if match: --=20 2.53.0 From nobody Wed Jun 17 06:02:53 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 736673C3C15; Mon, 27 Apr 2026 13:00:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294819; cv=none; b=BmDxjE+PKnSEXZulM3rZZt9Wdcn+XHXhtZ8RYfEu830sjqMzA7EPi5nX+Z4Jw9MdBNF3pDToDmYis/QOEFWNbTkBCfpftzkuWmxNvGUn+vR/HAxh4YoFOgvpKfjamKpbFYshiV2HgommVdSCcsy/A6QieG5sUfr+T9D5gWx0920= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294819; c=relaxed/simple; bh=BpJ6sywaSZVQxAguZ1xiEWvvUTov0XqlViROQ62XlmA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jmw4tcT6Ih95pvwnIy7XIflr12ripL2UM8t3DK18QdTbkOwLgQacg0DH1WZnUhscpAcaIbhdZKZCM1fsb9d25EOjJlUGjLw5cPvYlZQIYJ3z00Ws1jOrPRRkuvvsiyR6NKRavEHr5NN1hwiS7cH8EmuHUx++GoQ8psKOZ5hOiX0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gzkqsMhj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gzkqsMhj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 349A4C2BCB4; Mon, 27 Apr 2026 13:00:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777294819; bh=BpJ6sywaSZVQxAguZ1xiEWvvUTov0XqlViROQ62XlmA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gzkqsMhjuF/OjfSGRMS2/YtvqWJONB+/N9KHoHvaPqowbgBX/C+ohdS4PcckRp0lK 1TcjU518b5FbwkmQhpKhnKegNIGfg1hWKVUToSQnruMEMdlxdfzPOxatyB1Eb/IQ95 QeJSKwmQ2kffONun4FpfnG++ADf3cZsSB7LEfuAB7CCyXKVbH57lVcB5pWSsOv85W+ gS9oR4f4MlV06uk8HFRhaJOlN/1ed56DCk4xZD6KdEKDU0jT/A+43NqeKFi4NIf8XF xt1tV914NnJ3S4HaVOImVa/cY/1mwMg8QVlKPo60f8v8O4efbOuhSDqpBh3iS6QLoT PFGBd3SwBQxtQ== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wHLZR-0000000BxCQ-1y3B; Mon, 27 Apr 2026 15:00:17 +0200 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, workflows@vger.kernel.org, Mauro Carvalho Chehab , Shuah Khan Subject: [PATCH v3 09/12] docs: maintainers_include: Only show main entry for profiles Date: Mon, 27 Apr 2026 15:00:09 +0200 Message-ID: X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Instead of showing as a "Contents:" with 2 identation levels, drop its title and show profiles as a list of entries. Signed-off-by: Mauro Carvalho Chehab Reported-by: Randy Dunlap Suggested-by: Dan Williams --- Documentation/process/maintainer-handbooks.rst | 2 -- Documentation/sphinx/maintainers_include.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Documentation/process/maintainer-handbooks.rst b/Documentation= /process/maintainer-handbooks.rst index 531985a0fae8..3821e78aefc0 100644 --- a/Documentation/process/maintainer-handbooks.rst +++ b/Documentation/process/maintainer-handbooks.rst @@ -16,6 +16,4 @@ For maintainers, consider documenting additional requirem= ents and expectations if submissions routinely overlook specific submission criteria. See Documentation/maintainer/maintainer-entry-profile.rst. =20 -Contents: - .. maintainers-profile-toc:: diff --git a/Documentation/sphinx/maintainers_include.py b/Documentation/sp= hinx/maintainers_include.py index 948746b998a3..7ab921820612 100755 --- a/Documentation/sphinx/maintainers_include.py +++ b/Documentation/sphinx/maintainers_include.py @@ -235,7 +235,7 @@ class MaintainersProfile(Include): maint =3D MaintainersParser(base_path, path) =20 output =3D ".. toctree::\n" - output +=3D " :maxdepth: 2\n\n" + output +=3D " :maxdepth: 1\n\n" =20 items =3D sorted(maint.profiles.items(), key=3Dlambda kv: (kv[1] or "", kv[0])) --=20 2.53.0 From nobody Wed Jun 17 06:02:53 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 986123C4542; Mon, 27 Apr 2026 13:00:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294819; cv=none; b=dNYP9VWLxZNZKmyM2BdAVx5dgU3oSS2LmbMgsPnaFxomyHC1XyOLzoCAgBvaRcEujeIlz6UxJY1WD78x4b3jGy0VHWjXVRVYE48DhmzE+q3IDtWt5nKnlsZh/mIjEsv1JZSMdHWmgqJCba8A6oPS9vzF/t+dYZtczli+fUd+zZg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294819; c=relaxed/simple; bh=foSitjGjVjWkt3FOsEjErrXwoSNFIILUN9JQwZDwqYk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XcpAdt9SeW3oUJik7kYH6SoNVDRsvfKF6jCgT0KdirGTebkCkm4qImC51RDMOXgQUb1AEkbJb46GlsDt5kAk/DwWTd8ax6thnBEWGFju943HzFOJqwbVpMLoLYfG9QojWsS+xqesPWulRPRU8t4+A8vxmy80hW1oJV516EM2BBQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Qvev6HLJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Qvev6HLJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B883C2BCC4; Mon, 27 Apr 2026 13:00:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777294819; bh=foSitjGjVjWkt3FOsEjErrXwoSNFIILUN9JQwZDwqYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qvev6HLJuMayIpthungyNVUdSr2Z2XZPDzRo7epemBAJ5/RSlVHAa5TEp9LxOU8c2 la2K3OpTx3G/d9kIUrhtC5KyoHROHPddBfJqk1OyosBd8OGBRFmMVBftv8lEsdCk4E 83ZpBT8uRn/nDhicLaqZc5mw+jLzEWlBH8S1Qp7uwK4NOMuKTr1GPkvbFk/8Qoskxn UyOZ5smkEZFq1pc9hiy0V4MW/iG0qqRvQFskGQBV411UT0r0AN2SExI2i9Gl0glpoL Skl/brxwB1BfU/adurrwNa1ooEBTwxTXZtVVnBS1557ql3PInU8suRKLk7LFmfwnfG n5Y251VWyMZAw== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wHLZR-0000000BxDd-2hcX; Mon, 27 Apr 2026 15:00:17 +0200 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List , Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, workflows@vger.kernel.org, Shuah Khan Subject: [PATCH v3 10/12] docs: maintainers_include: improve its output Date: Mon, 27 Apr 2026 15:00:10 +0200 Message-ID: X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab There are three "types" of profiles: 1. Profiles already included inside subsystem-specific documentation. This is the most common case; 2. Profiles that are hosted externally; 3. Profiles that are at the same location as maintainer-handbooks.rst. For (3), we need to create a TOC, as they don't exist elsewhere. Change the logic to create TOC just for (3), prepending the content of maintainer-handbooks with a sorted entry of all types, before the TOC. With such change, we can have an unique sorted list of profiles, having the subsystem names used there listed. Signed-off-by: Mauro Carvalho Chehab Reported-by: Randy Dunlap Suggested-by: Dan Williams --- Documentation/sphinx/maintainers_include.py | 76 +++++++++++---------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/Documentation/sphinx/maintainers_include.py b/Documentation/sp= hinx/maintainers_include.py index 7ab921820612..5413c1350bba 100755 --- a/Documentation/sphinx/maintainers_include.py +++ b/Documentation/sphinx/maintainers_include.py @@ -21,7 +21,7 @@ import sys import re import os.path =20 -from textwrap import indent +from glob import glob =20 from docutils import statemachine from docutils.parsers.rst import Directive @@ -36,8 +36,8 @@ class MaintainersParser: """Parse MAINTAINERS file(s) content""" =20 def __init__(self, base_path, path): - self.profiles =3D {} - self.profile_urls =3D {} + self.profile_toc =3D set() + self.profile_entries =3D {} =20 result =3D list() result.append(".. _maintainers:") @@ -73,26 +73,24 @@ class MaintainersParser: # Drop needless input whitespace. line =3D line.rstrip() =20 + # + # Handle profile entries - either as files or as https refs + # match =3D re.match(r"P:\s*(Documentation/\S+)\.rst", line) if match: - fname =3D os.path.relpath(match.group(1), base_path) - if fname.startswith("../"): - if self.profiles.get(fname) is None: - self.profiles[fname] =3D subsystem_name - else: - self.profiles[fname] +=3D f", {subsystem_name}" + entry =3D os.path.relpath(match.group(1), base_path) + if "*" in entry: + for e in glob(entry): + self.profile_toc.add(e) + self.profile_entries[subsystem_name] =3D e else: - self.profiles[fname] =3D None - - match =3D re.match(r"P:\s*(https?://.*)", line) - if match: - url =3D match.group(1).strip() - if url not in self.profile_urls: - if self.profile_urls.get(url) is None: - self.profile_urls[url] =3D subsystem_name - else: - self.profile_urls[url] +=3D f", {subsystem_name}" - + self.profile_toc.add(entry) + self.profile_entries[subsystem_name] =3D entry + else: + match =3D re.match(r"P:\s*(https?://.*)", line) + if match: + entry =3D match.group(1).strip() + self.profile_entries[subsystem_name] =3D entry =20 # Linkify all non-wildcard refs to ReST files in Documentation= /. pat =3D r'(Documentation/([^\s\?\*]*)\.rst)' @@ -234,26 +232,32 @@ class MaintainersProfile(Include): =20 maint =3D MaintainersParser(base_path, path) =20 - output =3D ".. toctree::\n" - output +=3D " :maxdepth: 1\n\n" + # + # Produce a list with all maintainer profiles, sorted by subsystem= name + # + output =3D "" =20 - items =3D sorted(maint.profiles.items(), - key=3Dlambda kv: (kv[1] or "", kv[0])) - for fname, profile in items: - if profile: - output +=3D f" {profile} <{fname}>\n" + for profile, entry in maint.profile_entries.items(): + if entry.startswith("http"): + if profile: + output +=3D f"- `{profile} <{entry}>`_\n" + else: + output +=3D f"- `<{entry}>_`\n" else: - output +=3D f" {fname}\n" + if profile: + output +=3D f"- :doc:`{profile} <{entry}>`\n" + else: + output +=3D f"- :doc:`<{entry}>`\n" =20 - output +=3D "\n**External profiles**\n\n" + # + # Create a hidden TOC table with all profiles. That allows adding + # profiles without needing to add them on any index.rst file. + # + output +=3D "\n.. toctree::\n" + output +=3D " :hidden:\n\n" =20 - items =3D sorted(maint.profile_urls.items(), - key=3Dlambda kv: (kv[1] or "", kv[0])) - for url, profile in items: - if profile: - output +=3D f"- {profile} <{url}>\n" - else: - output +=3D f"- {url}\n" + for fname in maint.profile_toc: + output +=3D f" {fname}\n" =20 output +=3D "\n" =20 --=20 2.53.0 From nobody Wed Jun 17 06:02:53 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD9BF3C456B; Mon, 27 Apr 2026 13:00:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294819; cv=none; b=glCvBpvs4fZjDTSJbV0OdKMj4kwyE7sc8WajJPWpDLYPTU3Bn0ALQ/m0FIjn0u0qwP3aQmxIMwYSbkVx5kEsqBvv40vnq9fpruSeNIbMu2G/txtaq94mAtUV86uxmbp3v8eMZJ0w4jFSDXBkZifr9uLtG5R3bLiNnaBE8rkgxh8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294819; c=relaxed/simple; bh=9WClNhud4aDzY0l2t1PwxaLHqFpthSUfn2BKHY4i39Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nkV3O5HplQEIBjQISLvK7uS1vVQhQ1O9sP+tU3gjwmTZSdEIP+X8njq5e1pkrmbnB18CttTVwUAxi7UYC44Kz4dhxR5pWYx9i+Hz9gJZSwC65I2wk95w8TarJFDhaMLmvJbxhMNYgaEKH3ePL+RU1hp4XcymEqeH5hSRD8iWtJQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hySY/40c; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hySY/40c" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86829C2BCB9; Mon, 27 Apr 2026 13:00:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777294819; bh=9WClNhud4aDzY0l2t1PwxaLHqFpthSUfn2BKHY4i39Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hySY/40cOLN4Pn1eBn8FO4XU7ENGhRVNGW8A/5sv17rgsMbQC0nPpFktSODo2ISnc 16Hb5Ve3C+gjyofxEbmZw97A/NtFrrWOSsN4g1pcO8KVFjQ2pp6pfhu/pcWu82aIE7 MQCLeVcRcdVdJLReZPWwmsxFv3w8VKgbfOpktnv8qYNFJxfTEoF0zbQOaBW0SY2A2l jwb5Bb0NnYuOaK8YoQLNl585DSGmFUWf29UC0AJ/nJBvTbTRz1OtW8878bVfJVmgI/ GILQDPO3PfruCCBIHbU2sJb3sdmAuTJ+lMrGjQrdLs3W0/v6aPpayw8pR1sN3+cCRs AJixGX8BDHSkA== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wHLZR-0000000BxEs-3RgC; Mon, 27 Apr 2026 15:00:17 +0200 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List , Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, workflows@vger.kernel.org, Shuah Khan , Randy Dunlap Subject: [PATCH v3 11/12] docs: maintainers_include: fix support for O=dir Date: Mon, 27 Apr 2026 15:00:11 +0200 Message-ID: X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab os.path.relpath() will do the wrong thing with O=3Ddir, as the build system uses "cd " internally. Solve it by using app.srcdir, which, on normal cases, point to Documentation/, or, when SPHINXDIRS=3Dprocess, it will be set with Documentation/process. While here, remove a dead code while writing maintainer profiles, as now all entries should have both profile and entry. Reported-by: Randy Dunlap Closes: https://lore.kernel.org/linux-doc/88335220-3527-4b1f-9500-417f7ebb7= a02@infradead.org/T/#m6854cbd8d30e2c5d3e8c4173bae1c3d6922ff970 Signed-off-by: Mauro Carvalho Chehab Suggested-by: Dan Williams --- Documentation/sphinx/maintainers_include.py | 71 +++++++++++++++------ 1 file changed, 50 insertions(+), 21 deletions(-) diff --git a/Documentation/sphinx/maintainers_include.py b/Documentation/sp= hinx/maintainers_include.py index 5413c1350bba..ae52e8198750 100755 --- a/Documentation/sphinx/maintainers_include.py +++ b/Documentation/sphinx/maintainers_include.py @@ -27,15 +27,24 @@ from docutils import statemachine from docutils.parsers.rst import Directive from docutils.parsers.rst.directives.misc import Include =20 +# +# Base URL for intersphinx-like links to maintainer profiles +# +KERNELDOC_URL =3D "https://docs.kernel.org/" + def ErrorString(exc): # Shamelessly stolen from docutils return f'{exc.__class__.__name}: {exc}' =20 __version__ =3D '1.0' =20 +app_dir =3D "." + class MaintainersParser: """Parse MAINTAINERS file(s) content""" =20 - def __init__(self, base_path, path): + def __init__(self, path): + global app_dir + self.profile_toc =3D set() self.profile_entries =3D {} =20 @@ -57,6 +66,9 @@ class MaintainersParser: field_content =3D "" subsystem_name =3D None =20 + base_dir, doc_dir, sphinx_dir =3D app_dir.partition("Documentation= ") + print("BASE DIR", base_dir) + for line in open(path): # Have we reached the end of the preformatted Descriptions tex= t? if descriptions and line.startswith('Maintainers'): @@ -76,9 +88,25 @@ class MaintainersParser: # # Handle profile entries - either as files or as https refs # - match =3D re.match(r"P:\s*(Documentation/\S+)\.rst", line) + match =3D re.match(rf"P:\s*({doc_dir})(/\S+)\.rst", line) if match: - entry =3D os.path.relpath(match.group(1), base_path) + name =3D "".join(match.groups()) + entry =3D os.path.relpath(base_dir + name, app_dir) + + full_name =3D os.path.join(base_dir, name) + path =3D os.path.relpath(full_name, app_dir) + # + # When SPHINXDIRS is used, it will try to reference files + # outside srctree, causing warnings. To avoid that, point + # to the latest official documentation + # + if path.startswith("../"): + entry =3D KERNELDOC_URL + match.group(2) + ".html" + else: + entry =3D "/" + entry + + print(f"{name}: entry: {entry} FULL: {full_name} path: {pa= th}") + if "*" in entry: for e in glob(entry): self.profile_toc.add(e) @@ -189,10 +217,10 @@ class MaintainersInclude(Include): """MaintainersInclude (``maintainers-include``) directive""" required_arguments =3D 0 =20 - def emit(self, base_path, path): + def emit(self, path): """Parse all the MAINTAINERS lines into ReST for human-readability= """ =20 - output =3D MaintainersParser(base_path, path).output + output =3D MaintainersParser(path).output =20 # For debugging the pre-rendered results... #print(output, file=3Dopen("/tmp/MAINTAINERS.rst", "w")) @@ -213,11 +241,10 @@ class MaintainersInclude(Include): =20 # Append "MAINTAINERS" path =3D os.path.join(path, "MAINTAINERS") - base_path =3D os.path.dirname(self.state.document.document.current= _source) =20 try: self.state.document.settings.record_dependencies.add(path) - lines =3D self.emit(base_path, path) + lines =3D self.emit(path) except IOError as error: raise self.severe('Problems with "%s" directive path:\n%s.' % (self.name, ErrorString(error))) @@ -227,27 +254,20 @@ class MaintainersInclude(Include): class MaintainersProfile(Include): required_arguments =3D 0 =20 - def emit(self, base_path, path): + def emit(self, path): """Parse all the MAINTAINERS lines looking for profile entries""" =20 - maint =3D MaintainersParser(base_path, path) + maint =3D MaintainersParser(path) =20 # # Produce a list with all maintainer profiles, sorted by subsystem= name # output =3D "" - - for profile, entry in maint.profile_entries.items(): + for profile, entry in sorted(maint.profile_entries.items()): if entry.startswith("http"): - if profile: - output +=3D f"- `{profile} <{entry}>`_\n" - else: - output +=3D f"- `<{entry}>_`\n" + output +=3D f"- `{profile} <{entry}>`_\n" else: - if profile: - output +=3D f"- :doc:`{profile} <{entry}>`\n" - else: - output +=3D f"- :doc:`<{entry}>`\n" + output +=3D f"- :doc:`{profile} <{entry}>`\n" =20 # # Create a hidden TOC table with all profiles. That allows adding @@ -261,6 +281,8 @@ class MaintainersProfile(Include): =20 output +=3D "\n" =20 + print(output) + self.state_machine.insert_input(statemachine.string2lines(output),= path) =20 def run(self): @@ -277,11 +299,10 @@ class MaintainersProfile(Include): =20 # Append "MAINTAINERS" path =3D os.path.join(path, "MAINTAINERS") - base_path =3D os.path.dirname(self.state.document.document.current= _source) =20 try: self.state.document.settings.record_dependencies.add(path) - lines =3D self.emit(base_path, path) + lines =3D self.emit(path) except IOError as error: raise self.severe('Problems with "%s" directive path:\n%s.' % (self.name, ErrorString(error))) @@ -289,6 +310,14 @@ class MaintainersProfile(Include): return [] =20 def setup(app): + global app_dir + + # + # NOTE: we're using os.fspath() here because of a Sphinx warning: + # RemovedInSphinx90Warning: Sphinx 9 will drop support for represent= ing paths as strings. Use "pathlib.Path" or "os.fspath" instead. + # + app_dir =3D os.fspath(app.srcdir) + app.add_directive("maintainers-include", MaintainersInclude) app.add_directive("maintainers-profile-toc", MaintainersProfile) return dict( --=20 2.53.0 From nobody Wed Jun 17 06:02:53 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EFFB83C5522; Mon, 27 Apr 2026 13:00:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294820; cv=none; b=qaunytOQY7kW9/jZSUz0UNie2CsxeU2jLRHpaPMdQZ5/vCIUVOdD9i1fv8yw5i0TtZer0TlMkjRlgQ6iww21E5Pr267wmgBJ2BIaM7doB75sw6i+eQsk7uo3LkNUz/baj4phm979ikb2Ov3i7kh4lD4JdmnJt+ZFMC5PQoMSPd0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777294820; c=relaxed/simple; bh=2EHIpNiSQOvDao9ENEGwgn3WieRzrgdPXVweOZ5ti+I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Rz6aXpwj7E1d9S+xfAYVlo7TSvHAhSMf1ujfDG1UCPUUqdkR/tpOseWehXLnQJ24acFi3D2cgzMiS74b0LRdb+R8KjhT++czGaeSf8u/ZzRQzlj0MrWFpGQmg9GEs8fG1EvYj9aiTIeDLwC1vJxCHrLTgaYRnbcMRQwcm6FXs5A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XoHzOXyt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XoHzOXyt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3139C2BCB4; Mon, 27 Apr 2026 13:00:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777294819; bh=2EHIpNiSQOvDao9ENEGwgn3WieRzrgdPXVweOZ5ti+I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XoHzOXytyzqgCwFjACv78UpHahmHq9v2mqJUBZP9+jZKzRWTtm77kC1qU7nmEgmAg ZeiVxMV3f6oqjYUUDdiWofAPvmDWK+1Zp8c2ZiQcUf709pbwlaM5UXuY0rE7mdoncr rAzvSu38KQErdiu/bdm0Ns6ZnaM5v9gRSca5KOA+ywzbMev558uOr1bjn1eqxYhadX yzH0BVOfGnfCP+V3CWMpNK7N/EqPGFFJ7mRKfsEojLzI9xym981qPLJ/Cn5cRffiGd JHN2er1e9U6aBuDn8lANTLXg6tYrQClE/v70il4uQAqIhi7NEERmqVanHErXQwjO87 GGV8Q0rmj/dwA== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wHLZR-0000000BxG6-4Afv; Mon, 27 Apr 2026 15:00:17 +0200 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List , Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, workflows@vger.kernel.org, Shuah Khan Subject: [PATCH v3 12/12] docs: maintainers_include: parse MAINTAINERS just once Date: Mon, 27 Apr 2026 15:00:12 +0200 Message-ID: <3a01afc58defa4eb92df709b517392ef550f81b2.1777294623.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Change the logic to parse MAINTAINERS file content just once, while still allowing using it multiple times. Signed-off-by: Mauro Carvalho Chehab Reported-by: Randy Dunlap Suggested-by: Dan Williams --- Documentation/sphinx/maintainers_include.py | 61 +++++++-------------- 1 file changed, 21 insertions(+), 40 deletions(-) diff --git a/Documentation/sphinx/maintainers_include.py b/Documentation/sp= hinx/maintainers_include.py index ae52e8198750..436e7ac42ffc 100755 --- a/Documentation/sphinx/maintainers_include.py +++ b/Documentation/sphinx/maintainers_include.py @@ -37,14 +37,13 @@ def ErrorString(exc): # Shamelessly stolen from docuti= ls =20 __version__ =3D '1.0' =20 -app_dir =3D "." +maint_parser =3D None =20 class MaintainersParser: """Parse MAINTAINERS file(s) content""" =20 - def __init__(self, path): - global app_dir - + def __init__(self, app_dir, path): + self.path =3D path self.profile_toc =3D set() self.profile_entries =3D {} =20 @@ -67,7 +66,6 @@ class MaintainersParser: subsystem_name =3D None =20 base_dir, doc_dir, sphinx_dir =3D app_dir.partition("Documentation= ") - print("BASE DIR", base_dir) =20 for line in open(path): # Have we reached the end of the preformatted Descriptions tex= t? @@ -105,8 +103,6 @@ class MaintainersParser: else: entry =3D "/" + entry =20 - print(f"{name}: entry: {entry} FULL: {full_name} path: {pa= th}") - if "*" in entry: for e in glob(entry): self.profile_toc.add(e) @@ -217,14 +213,17 @@ class MaintainersInclude(Include): """MaintainersInclude (``maintainers-include``) directive""" required_arguments =3D 0 =20 - def emit(self, path): + def emit(self): """Parse all the MAINTAINERS lines into ReST for human-readability= """ + global maint_parser =20 - output =3D MaintainersParser(path).output + path =3D maint_parser.path + output =3D maint_parser.output =20 # For debugging the pre-rendered results... #print(output, file=3Dopen("/tmp/MAINTAINERS.rst", "w")) =20 + self.state.document.settings.record_dependencies.add(path) self.state_machine.insert_input(statemachine.string2lines(output),= path) =20 def run(self): @@ -232,19 +231,8 @@ class MaintainersInclude(Include): if not self.state.document.settings.file_insertion_enabled: raise self.warning('"%s" directive disabled.' % self.name) =20 - # Walk up source path directories to find Documentation/../ - path =3D self.state_machine.document.attributes['source'] - path =3D os.path.realpath(path) - tail =3D path - while tail !=3D "Documentation" and tail !=3D "": - (path, tail) =3D os.path.split(path) - - # Append "MAINTAINERS" - path =3D os.path.join(path, "MAINTAINERS") - try: - self.state.document.settings.record_dependencies.add(path) - lines =3D self.emit(path) + lines =3D self.emit() except IOError as error: raise self.severe('Problems with "%s" directive path:\n%s.' % (self.name, ErrorString(error))) @@ -254,16 +242,17 @@ class MaintainersInclude(Include): class MaintainersProfile(Include): required_arguments =3D 0 =20 - def emit(self, path): + def emit(self): """Parse all the MAINTAINERS lines looking for profile entries""" + global maint_parser =20 - maint =3D MaintainersParser(path) + path =3D maint_parser.path =20 # # Produce a list with all maintainer profiles, sorted by subsystem= name # output =3D "" - for profile, entry in sorted(maint.profile_entries.items()): + for profile, entry in sorted(maint_parser.profile_entries.items()): if entry.startswith("http"): output +=3D f"- `{profile} <{entry}>`_\n" else: @@ -276,13 +265,12 @@ class MaintainersProfile(Include): output +=3D "\n.. toctree::\n" output +=3D " :hidden:\n\n" =20 - for fname in maint.profile_toc: + for fname in maint_parser.profile_toc: output +=3D f" {fname}\n" =20 output +=3D "\n" =20 - print(output) - + self.state.document.settings.record_dependencies.add(path) self.state_machine.insert_input(statemachine.string2lines(output),= path) =20 def run(self): @@ -290,19 +278,8 @@ class MaintainersProfile(Include): if not self.state.document.settings.file_insertion_enabled: raise self.warning('"%s" directive disabled.' % self.name) =20 - # Walk up source path directories to find Documentation/../ - path =3D self.state_machine.document.attributes['source'] - path =3D os.path.realpath(path) - tail =3D path - while tail !=3D "Documentation" and tail !=3D "": - (path, tail) =3D os.path.split(path) - - # Append "MAINTAINERS" - path =3D os.path.join(path, "MAINTAINERS") - try: - self.state.document.settings.record_dependencies.add(path) - lines =3D self.emit(path) + lines =3D self.emit() except IOError as error: raise self.severe('Problems with "%s" directive path:\n%s.' % (self.name, ErrorString(error))) @@ -310,13 +287,17 @@ class MaintainersProfile(Include): return [] =20 def setup(app): - global app_dir + global maint_parser =20 # # NOTE: we're using os.fspath() here because of a Sphinx warning: # RemovedInSphinx90Warning: Sphinx 9 will drop support for represent= ing paths as strings. Use "pathlib.Path" or "os.fspath" instead. # app_dir =3D os.fspath(app.srcdir) + srctree =3D os.path.abspath(os.environ["srctree"]) + path =3D os.path.join(srctree, "MAINTAINERS") + + maint_parser =3D MaintainersParser(app_dir, path) =20 app.add_directive("maintainers-include", MaintainersInclude) app.add_directive("maintainers-profile-toc", MaintainersProfile) --=20 2.53.0