From nobody Tue Jun 16 08:52:42 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 ADEEF3624A6; Fri, 17 Apr 2026 06:11:27 +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=1776406287; cv=none; b=eYmSfMQ4AKYffGqxl5gwiwRazkyI4ohnx5uk5zx9caWAMgrXCcQ57+fEyOc0zet9eKHs1XKyHwm6mgjAbgSH4zIFDqRbXwY/F63K+LIM/Vu0ZX3NBpuPrHfqfOsFyeK+xJ27htb2DcpZRzXL3FeYKz8udZn6vBz40V9DekYNYBY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776406287; c=relaxed/simple; bh=yhHzbQrXLXYtWB/ywVwFbSxzVS5ND+M7WVXUQWu6cT4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mC/IMG0G4P5m4IWAjOsN126J10OtzU7YHKuo0nLPBKbsijhjLyu4kVyr/9T7QABD6LC2Hzv5AwRB2PKRCF+bpCu/lsVY2FYx75ob0hr0v2HkAf1bCkTkirmtpjuDiMpzAWNo+iU3tbdwgGOc3Tymu8FpyI7dlOXre8kYnqNUC28= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=J206i24x; 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="J206i24x" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C99CC2BCB6; Fri, 17 Apr 2026 06:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776406287; bh=yhHzbQrXLXYtWB/ywVwFbSxzVS5ND+M7WVXUQWu6cT4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J206i24xfOGbi5OPh0QNWbDumCcoYIm88LEfHbHGMzeiYsnSH/x9x+0B0Zecgf6dX tEpzdvlb/wX+59/Z0kmhgBvHfYuvnt3fD6E+/WmZ65C4nYC5mKP3GGdL1GXyOYlRuL EBRKmlijxxsJe5gmPP3zXI42uNBNl1pA/721Nfma1EvibuGwO93SkYnS1fSwlqhNY5 Fq+lWNHlaSDNCIoYifuPAPzuxx+6Rc7qdAy0uSZU0nsbh4kpY1ZUlbBW5UjRZ37EOO LHSxmy4v0yo9H/VJ+VRKmKi8JiZbY+e2v1rRHENMQkFtjsCLPLXGgKarLqPII0TDLU ikowZDSHkoDMA== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wDcQH-0000000H8sR-1uL5; Fri, 17 Apr 2026 08:11:25 +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, Dan Williams , Mauro Carvalho Chehab , Randy Dunlap Subject: [PATCH v2 01/11] MAINTAINERS: add an entry for media maintainers profile Date: Fri, 17 Apr 2026 08:11:11 +0200 Message-ID: <361c00348573e45b4e06b674b2b45e47dc65c938.1776405189.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 Reviewed-by: Randy Dunlap Suggested-by: Dan Williams Tested-by: Randy Dunlap --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index f0b106a4dd96..620219e48f98 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16115,6 +16115,7 @@ S: Maintained W: https://linuxtv.org Q: http://patchwork.kernel.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 Tue Jun 16 08:52:42 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 ADFDE363C46; Fri, 17 Apr 2026 06:11:27 +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=1776406287; cv=none; b=i+vCu05LVunVVJc+e1H0PV4bO8zVDSPnl7DEuQCAtKiQiSlCWbWLbvUgg5Hbh7SyzMGStrpFYtGQ3BON3kOmaeYEnaSe9vYgxpZXK07dSZoLyQdTgMS3M8Lb8llhkvxqK10qDAcgkOQBUd40v5GekLHAfF5zQ4vs9stl/Oa8SrU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776406287; c=relaxed/simple; bh=cbloFBaSFVqLFASbOdMdsq9XcyspmRgafo7Pco+EW+4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LCB6s4srYsxjH6I+wfdQhjxzN8wragAmneSj5sVdvC/MFEvy20NLFdkiqG2nibXK9gvZQbJhxCkcd49YxrAD3sqhwxCArPYkRLkI/jXqxRV+2X5Ymx8dryA3sKtT/t3A7iUpV0Jpi5hvWXLGSplTQ8GJ5d7Z/GdIwU2Ss9MTswQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lRk1g6we; 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="lRk1g6we" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5734BC4AF09; Fri, 17 Apr 2026 06:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776406287; bh=cbloFBaSFVqLFASbOdMdsq9XcyspmRgafo7Pco+EW+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lRk1g6we/NrjPuRtqhvHjM8xA2V2X/BOvwD290+yMFOOnhf3xrhEtdtRjX0gc3OKF gbLrD2lDwMZ0DZr36tS4+4TuVvMdV6aoKBfjAbvdwiv9Tt0zvanLsZ6ZDea8R0mmv4 veKZUUbbMn9vacpoYiDDBy2CN43HdAXLzSLfsl1PnW1K0McQNmYyjc+lnd+q812rTQ 7S3V5wsgpLF5q57iRBe4UTpfv+er5Aj7IHP3naNQwvDr4WW8tYl8wkFi7oyA48mPIJ MqaNs2XfEHTVu55ZU6pxn6OKL6LSZjQgiNiVYj6XiUpkgeJzeJ/0l/R2c4oY+Nke7w hlQ1kT1UXLlug== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wDcQH-0000000H8sV-21d5; Fri, 17 Apr 2026 08:11:25 +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, Dan Williams , Mauro Carvalho Chehab , Randy Dunlap Subject: [PATCH v2 02/11] MAINTAINERS: add maintainer-tip.rst to X86 Date: Fri, 17 Apr 2026 08:11:12 +0200 Message-ID: <9711e3ed5898226173768725836e536d6c759a18.1776405189.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 Reviewed-by: Randy Dunlap Suggested-by: Dan Williams Tested-by: Randy Dunlap --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 620219e48f98..a85fcae5f56e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -28560,6 +28560,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 Tue Jun 16 08:52:42 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 ADDD5351C28; Fri, 17 Apr 2026 06:11:27 +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=1776406287; cv=none; b=QNALrsPw5HCdp0VkN5WKjHIn3M67NGS+NVS2rzPFIMxFw7hYHfKiDvKm5hn2vFuaMQ19Lyt1UHS64zQaDL6hcw5g42ofR8reynoWQ7zXtWKWIv2gbJqYRGZMpd7M6iYn4025NRjYvsZ2vxFGxSTmXo8uI4tVjGf5ymV0rUEXNeo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776406287; c=relaxed/simple; bh=lpFijLl6DOvM61uAD6IUooTPFM8/pj/MpyljGy4dY4Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=renc0+mQzGJGYIDnVUjaq2ND76d7CtacVrEYqtVcfv+pUJHlm62KS8yINc78yBzXo5zmSTY8YTo5J9ub7yINjjvNlLKz6ipiuj22mNVDKMh+51IVNbp/d4qo6SZ/NagzYTzMUbZbcvWuEUnxTeiH4Pn3YjtWcY9kkPQWCZU4Ax0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DHY1uT9N; 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="DHY1uT9N" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 551E9C2BCB4; Fri, 17 Apr 2026 06:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776406287; bh=lpFijLl6DOvM61uAD6IUooTPFM8/pj/MpyljGy4dY4Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DHY1uT9NosBb/2dwmUGHX98luF3zEZhY/hJps+A4+PnRfToUlWvtIP7O8VaOvoXTc PApGzrjZAYu4HPiaz/JDTsXhpCzBEiFI4GUDrWdKw+ckuTBrNxv2Gh9ENCuO+M+mUY QKY0oT7ARpOGCkV/BapoE8Lf/LxAZO2zRky5ROf3Tsm2RfKU3jMVMeQMquZimoaUqU 8v9CVHc9dQOIRVygm0oht2rcAlgOP/EfcTO3IUTBsAPYaYh19tL0gI5VeXm7vNztPQ mjZnJ1Uxn6k7QvLG7JFiasicpDVPoD1p8s2PmTecexWwHZQGdcRubXC0lTpHRyPDNa 6S2zoszcW0Pkw== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wDcQH-0000000H8sZ-28uc; Fri, 17 Apr 2026 08:11:25 +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, Dan Williams , Randy Dunlap , Shuah Khan Subject: [PATCH v2 03/11] docs: maintainers_include: auto-generate maintainer profile TOC Date: Fri, 17 Apr 2026 08:11:13 +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 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 Reviewed-by: Randy Dunlap Tested-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 Tue Jun 16 08:52:42 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 D8FDB36E496; Fri, 17 Apr 2026 06:11:27 +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=1776406287; cv=none; b=tuO7hjUB5c0Wx9mnBRUpVygPnC6xDYvXxICRKMGVG82LoIWMu46BgMOEku8heRXF8xlCdd/j7cYZswCwoNuksPCzhATfI+WGf6AR6VX91b/qYWHMUlm65pevE+Pp4sZfOggJ5cVz4JBIBIwxjfLSyXJrroWLn9Owr2k1COaSUgE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776406287; c=relaxed/simple; bh=etykI6PjHqrvsDMvEbWFzTQyXVYcIo7uusJigHM5MX8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ahO+Egg4BnvDKz5UGrqBvqGhrWsDakWPkJef6vc6IKyY8Q64inEseF5tX/WnwVpgLih0I8JrM9YTyKOr2ngHpothmazzKVmouEUPpZ3xGRDvX1sG2aEMVdKlWjh6n+Ny69oXjx6dW0xzDLEMzLQEOeByFOxwMF8yQHGsMRb/rZY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vMykoyHP; 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="vMykoyHP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F1ABC2BCB5; Fri, 17 Apr 2026 06:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776406287; bh=etykI6PjHqrvsDMvEbWFzTQyXVYcIo7uusJigHM5MX8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vMykoyHP8EM+bYL/wT1QyBOZpIIcMYeHqZQ7vVR/hHePh16a9xh6kKfYmaa4VaWZR OS0WqGI3Lb/aP37rOq7xzV4z4SuY36vizePmk3XBU/ZN4hQorUmNIbNLSm1Bj2IWxd 0fCmWeAhyv2uClq4vBLMLp3P9/wXUWHI8cvakx7bz+k2BPVTmlWXvNBpdmmQHmIN6i bMXV+sf/vL4r7DhKfmusjUclHBGgxSYCxbLn69T1nBoNcG7OZCyh5tBoMntWbs37NF Qklob+xLHDnZ6oKNfrYIEd1a7d4P9n4UgZBf15qFhR1vfchb7CKBo36gPVarpQ++Q+ 2a0WNmS7yATFQ== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wDcQH-0000000H8sd-2GHB; Fri, 17 Apr 2026 08:11:25 +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 , Dan Williams , Mauro Carvalho Chehab , Palmer Dabbelt , Paul Walmsley , Randy Dunlap , Shuah Khan Subject: [PATCH v2 04/11] docs: auto-generate maintainer entry profile links Date: Fri, 17 Apr 2026 08:11:14 +0200 Message-ID: <47f251545c22f3eb20c811e3956385299c015438.1776405189.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 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 Reviewed-by: Randy Dunlap Suggested-by: Dan Williams Tested-by: Randy Dunlap --- .../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 Tue Jun 16 08:52:42 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 ADE6535B654; Fri, 17 Apr 2026 06:11:27 +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=1776406287; cv=none; b=Ngppn7mVqVGUjj+Ax8dS34rXxxRp/SaZZlcsic9iQVWXkPxk8MrPscUlUs0ywdRZrDTXWbIRx5YRpAcYSJBW+U+tlS/BAQWhP4Wecjo4Igkdpwe3gIbnc2Lvr6DYff45Zb+sEfz9mimcLheKDJ0d7eJGMDqLF8HyUAL8BO1M5xU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776406287; c=relaxed/simple; bh=NuYk28Zg9NLnbQ4d/3en1YVQRZ/qBlcvUunSiLU9FFk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ihXzkx27VO6GGlsU45PRfEvh0ThwwOPXQNYnX3s8PSQj2K1n3RPfFnQ2ymhwY/Og3iaUPeDdw6cSjtb2IWjlbB1XWswNY8IBG1uv8wDqLAJGWeJvUxgylXDOqxJ/DN6gOYhWI2UYzCM4cQtQ+JCXiMnP24sK3rYU+OFld7OGbs4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OpW4+3jz; 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="OpW4+3jz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59674C4AF0C; Fri, 17 Apr 2026 06:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776406287; bh=NuYk28Zg9NLnbQ4d/3en1YVQRZ/qBlcvUunSiLU9FFk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OpW4+3jzenYLBPpjtQ2R91vUhkYqRkp6mMWYQAFy6FdrdIw/WJU6nNRxtJqWbq6n4 SGzGUZ7Ngg5ZFp/HDXy14JNvBkTKClV16U17bomeJ0IqS6HpqjzxQP1D6az4DUhZ4I fr605VzXtXsSDXiyTD7RbowzkbDCYiXcfXm2Ox5NA20+wXl2hIjicyFQyIcpNs/dxF u+ldUwK8NuPM/tMkGskfDOIfuePlsJj86QkZOPc1E1Ifvn1H3iepbo9DqhzeKJB+02 mdQ82wn4jV/bUa/LRVpm00I0jRD1fKBtE+Tw2TWcmoP9kUajLVe7yoxLS5Qkbzak0d 1DgAHRUivAY9g== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wDcQH-0000000H8sh-2NJl; Fri, 17 Apr 2026 08:11:25 +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, Dan Williams , Randy Dunlap , Shuah Khan Subject: [PATCH v2 05/11] docs: maintainers_include: use a better title for profiles Date: Fri, 17 Apr 2026 08:11:15 +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 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 Reviewed-by: Randy Dunlap Suggested-by: Dan Williams Tested-by: Randy Dunlap --- 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 Tue Jun 16 08:52:42 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 D91FB36E497; Fri, 17 Apr 2026 06:11:27 +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=1776406287; cv=none; b=Ypt0kqoP00RjD4W1yJQfEJX72FCXn2TvO8iBK9jhcpqex3B+qbi02dJPFkC4RnYXF4xMH6g9G5LS90LGcwtdl7sG6R9qihVnFIEoohb/BZB2+o3Zq929ZdqVaRuECk6pvSxJgBUehnM9ZNOMbbcisz/YGfthXmFZtN2yNTHkBRY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776406287; c=relaxed/simple; bh=PN4FPVYRORp3XTpdvjjtDtB0ZIfuMMKyf0YVAqRdNAs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=T/wvKDzFvKedOre6qZkGwGezhyRuhXR4aU1xmvUDD9+mPOlpbnG4qKknFzSA5XiV45wkVefNSTb4Vlfu7TXSMJilQGPh6zmVu8M79Vla+gsCpMSCW3yhluzRwC93AByhgaHz5csDlFj05O+V9M5/yGN5lWbBjflBvfOP2RyQOMY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QHMZ0riZ; 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="QHMZ0riZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65CE2C2BCC4; Fri, 17 Apr 2026 06:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776406287; bh=PN4FPVYRORp3XTpdvjjtDtB0ZIfuMMKyf0YVAqRdNAs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QHMZ0riZ9BRt2dZbbm9yBkzv7KTSjwRaCViZzlbGUhUbRAmrRLTgTAEe/NOCNd+2W GaUjkvqSnkxfXyKCPbVMGPbdBlqD7NRLUmhdrSLkSOkICM1AMhgBVMnavFPSLHuCYC I8GkM5xV6C5ArUNfDgtu8gsZV6g/vt5oUKi/iF7EyW69oUfm1ePIi9Hm5YF5Y+k5+Q /XSS+zHWVW3b148HO3mPSDE0rOveEJ6IeoEmegBMG2Tt+hSEBC+JXKMYwC1MQN4I0K /vdbz3VwmsqrFWHAsasppLZvKDOaQp+2OEGnwC9vFCg3qqeePw0kzDpcE+btwUGWIc agwPI8Y60ADTQ== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wDcQH-0000000H8sl-2UKI; Fri, 17 Apr 2026 08:11:25 +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, Dan Williams , Randy Dunlap , Shuah Khan Subject: [PATCH v2 06/11] docs: maintainers_include: add external profile URLs Date: Fri, 17 Apr 2026 08:11:16 +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 Some subsystem profiles are maintained elsewhere. Add them to the output. Signed-off-by: Mauro Carvalho Chehab Reported-by: Randy Dunlap Reviewed-by: Randy Dunlap Suggested-by: Dan Williams Tested-by: Randy Dunlap --- 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 Tue Jun 16 08:52:42 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 DB287370D47; Fri, 17 Apr 2026 06:11:27 +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=1776406287; cv=none; b=uY1JLGfKJmfbRMgcnHtB6e4Dtg1JQyZ2EVCek+Y13srNryM5GMPn7cOtfo4uTmFtBDx9QiI+S/F1Y+1C+8TkGLYk5fSL+EBaGCqmvzQBETYOVwabclPoEyyLSUyQsaFQjP0ZlUQSIhz/C/4tLdqP3KvoBmvQUWWQOUto2YWwDBQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776406287; c=relaxed/simple; bh=4mjLTBn9APgLWMeXtSLp7kqR2oEmNfSkkkBNyyYhQPs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iJOrHrLpl3AhyT9RCLFrJb+U4uS/MG8czFhrOJ2pXr41MTZOpiDzgpA4Bl8aDhWvAkohy2dBadTmkrh0T8HvkBEnCkGQ59ANr0lK96bOg8ziUWBIZAR9WRc5fU1H6a6vu4emga3qbEhISkJUR7US+3soDWYsoJVX8Q+8MyzRAMU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fo6k3TJb; 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="fo6k3TJb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6128BC2BCB8; Fri, 17 Apr 2026 06:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776406287; bh=4mjLTBn9APgLWMeXtSLp7kqR2oEmNfSkkkBNyyYhQPs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fo6k3TJbUU+5mNCcxKlNYgAHgiU53txsGHEls1RF4Ecq9Ggl02mX+u76jwxWPhLpn 4xhDDBtNpgJghT4dXCt51ukY0y2Fv3J4KBJY5oNHOV5TD3DvQoHDAYWgcMCy2USHLv 1ck6+caGOf6UwYhXfbz2MwDz/T56woPJycUJast7tC2Ulegt5E8UFaL2kolwC4FHnc 4pachmzViHivji0z/wwFeIBPCzA5fd7D3aJdBB7NTegPLTgAKEh5soo8FrpQm6CeDF GKlDxVEnqmiI1wnUG75GrSC518TQxKu0soMJjoTAxNfVlcrD7f9RHdErGeFklTjC4E dlbiNTF9nX4Xw== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wDcQH-0000000H8sp-2bSc; Fri, 17 Apr 2026 08:11:25 +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, Dan Williams , Randy Dunlap , Shuah Khan Subject: [PATCH v2 07/11] docs: maintainers_include: preserve names for files under process/ Date: Fri, 17 Apr 2026 08:11:17 +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 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 Reviewed-by: Randy Dunlap Suggested-by: Dan Williams Tested-by: Randy Dunlap --- 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 Tue Jun 16 08:52:42 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 D9D5B36EA99; Fri, 17 Apr 2026 06:11:27 +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=1776406287; cv=none; b=VcwDfaf1EmNNumGoZb0eWcqgP4rEw+EuCtS8lKpVVu6ynq57gZX844wM/jF6bWzMKHGAY0Ekl9XGziYj0T3Tbj5w/MQQ4gD49+8/Jv62X4MOnBxDa7m2jrZZMO4Y/vKscwkXiOZ6sMCiEKXQTG2odJiU3N9MVK/i88m4QO3yiFY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776406287; c=relaxed/simple; bh=BpJ6sywaSZVQxAguZ1xiEWvvUTov0XqlViROQ62XlmA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IcKNtbeiW8QXZHNzT1DBVpfppVKYLXGBVM3x3LCQARSdViMhNyI7xhEBHFjJEJi6lLZ96ONJg8CB9zyThNWmHu0njA4WM5Qzn2XGpCKXgNNQyLgz/PFPcp+8d1KOb8qnDwrcVf/87gv5vkrT9dxYXd8S9oWivLveZ0BdEbtqXus= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eETLWqvc; 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="eETLWqvc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 637AAC2BCB7; Fri, 17 Apr 2026 06:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776406287; bh=BpJ6sywaSZVQxAguZ1xiEWvvUTov0XqlViROQ62XlmA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eETLWqvcFCC9Jaoj/5wsjHi9kiPxfIumXuUpdjrF9nilO9r8rGjD2BTka3Rni4Wj5 IlqECqNhQdIQUzL+I9bSnbKzGJkclMXG0wh3n1hdBY146/90U1a4N7mns6sSPF6AdU 23eBx29wRb2nxrxKzY3cD3cTfregYH7cdORdKxGPFmEZrv3F6PgRxybbW76mbCnx3N x9ABfov82Bu5S5p7lWRvNPJjO9Sc8F0kexQcIjQm6a3hBXLu3FNVV6CVfE9hhgYWal oJDVUHiFriz3T8AJdQvFIfnAcf3S4egZu+uIuKV0gpVsxUNhxq6BvgZqAeKPGeCaRc x6T+IAvWbLXoQ== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wDcQH-0000000H8st-2ifG; Fri, 17 Apr 2026 08:11:25 +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, Dan Williams , Mauro Carvalho Chehab , Randy Dunlap , Shuah Khan Subject: [PATCH v2 08/11] docs: maintainers_include: Only show main entry for profiles Date: Fri, 17 Apr 2026 08:11:18 +0200 Message-ID: <47a539808bb4bf754f36b4fe8d0aa7aa209b63aa.1776405189.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 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 Reviewed-by: Randy Dunlap Suggested-by: Dan Williams Tested-by: Randy Dunlap --- 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 Tue Jun 16 08:52:42 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 D8AAB36E48D; Fri, 17 Apr 2026 06:11:27 +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=1776406287; cv=none; b=u8dJCXRkVAu8FXqVZK7E7SDRD0tm9jF6tIuFxWZM5DTXqaqwpPQPE+WE9+RPGcN11PzD4EHfowOTn8juuTwvu3rBx6Gsvhw7ZUdeeR/cAzgl/f1hR9O2fOhXUhJ5VpmNWA+5JYpRJVGMQD4HT+f0QnSvQ2/vrmSWqUDsku+FxfA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776406287; c=relaxed/simple; bh=foSitjGjVjWkt3FOsEjErrXwoSNFIILUN9JQwZDwqYk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Nc7LwFJ5W9rGCcIuzYKhHXE9Goee3lCDZtiv8DyqbRpiuX9uGX/ZcF5zmCgF9ygjOj134EHprztYO01E0ZkFRI70YRCekH7pMrAYsTod9umNW6aRoqrMAP+uYqWhpN9O/NTiZjsOkxlezZBwZP4kmvWq6KGCAg8oPqysBJyOWVs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DFPxTZvw; 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="DFPxTZvw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BD92C2BCC7; Fri, 17 Apr 2026 06:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776406287; bh=foSitjGjVjWkt3FOsEjErrXwoSNFIILUN9JQwZDwqYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DFPxTZvwQGNUIJnPeYpr1hWPfNuau/s+OaE7r4iZhlcvof5AaClBHJrh5TKv0p3dy 1EYvG5pg5KhL4cqz9899f/pND84Yps4g534GoD6wn5Csirj9CvN5r3KVxUcCKqOkXP w+xvCrdSpbG39ICPqAdK86WHviL50MST1KNIg4hNF6S/heyCvXTPkLMKVRRMcAAaIy 1QLtQ2fK1qk61F2d5TTaHZI2UBD0JbpzE06jSHzNrNLBiSY0dHyJYcsxciFEsNy18Y v7zm18JciTmf8qBj2TzRtJZ4e+a9ytK54YadF4i+Cz1zJ9Ib7hb9N3h+ZE+53Qqmn0 PMgJhESl3brrQ== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wDcQH-0000000H8sx-2png; Fri, 17 Apr 2026 08:11:25 +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, Dan Williams , Randy Dunlap , Shuah Khan Subject: [PATCH v2 09/11] docs: maintainers_include: improve its output Date: Fri, 17 Apr 2026 08:11:19 +0200 Message-ID: <6912a6a66e6594f10e8ab886a984cf45cbe697c2.1776405189.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 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 Reviewed-by: Randy Dunlap Suggested-by: Dan Williams Tested-by: Randy Dunlap --- 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 Tue Jun 16 08:52:42 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 DCE40370D6A; Fri, 17 Apr 2026 06:11:27 +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=1776406287; cv=none; b=dOYQFg28eyrFNZhBsloRFxmmje/qbdSg8AQG27m+wPjvLnF1LTy3GMN5ZP8S1rnbHDbetDi9lfVd1H8I3fUGZP7uU/d9zjiS2GdnsbBnH8iDLuNxrq8Uk/0O+xAVlgz/04XdngyDw90WOZUy3KiMRb+RAiuqByg3juO2ZhzCmjI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776406287; c=relaxed/simple; bh=9WClNhud4aDzY0l2t1PwxaLHqFpthSUfn2BKHY4i39Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DoR4q2e463bK3UPQ/h9B090xHUjO/9d2A0X8bVJBEzr0R+8Do4p6TIHXq21XrQgXSQfHzV5zB1O9Y7UlhjtRHzdvgbF+bLSXDbbsZJW33y8Ubp4VCZfqSWRw3W8TrIO8gNwGzcSFiVEM+nLUsnSwaCwcrbLDQNkF2KPgZpztImw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=F+HpgrRT; 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="F+HpgrRT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 696E9C2BCC6; Fri, 17 Apr 2026 06:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776406287; bh=9WClNhud4aDzY0l2t1PwxaLHqFpthSUfn2BKHY4i39Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F+HpgrRTpRMSRql/fia/gKDen8vl6CIllj0WRRMBvkvc1+uIGnNblZm3K+v8tO9Hb wfOqqfGlL29weLL/QH0fXrM3H5O5wI7oYspxwWO6fprh4Khww8M0P75N4DtDSPb3VZ nUM2ECviGuw+XUKQFRXLEUFgV/Z7VHLmCjJIJIOSFapDbr6Fhjg3OAUBgjZ2J2a83B ea0GyrbsIsOTWp/DUB0QoJZ+lt0DZEKLEaIunghz22/n8Jlx1lOsC71WrMKTCTGTZj qZUYyDBf68bLa76i3eSEDOxASndJ8tJyJMkmNZRMDzPscNzShDg1TgtAGGZbJTxCbX W4l7xn1FrAq7g== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wDcQH-0000000H8t1-2wzi; Fri, 17 Apr 2026 08:11:25 +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, Dan Williams , Randy Dunlap , Shuah Khan Subject: [PATCH v2 10/11] docs: maintainers_include: fix support for O=dir Date: Fri, 17 Apr 2026 08:11:20 +0200 Message-ID: <45d21c9d47c82471b4e35ea743b87bfcd279902f.1776405189.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 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 Reviewed-by: Randy Dunlap Suggested-by: Dan Williams Tested-by: Randy Dunlap --- 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 Tue Jun 16 08:52:42 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 D9FAB36F43E; Fri, 17 Apr 2026 06:11:27 +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=1776406287; cv=none; b=DoUJydRX1krZTuDTIQtO7jC94IsbF3cVRassVVOPtbDn22MpGzdndPC/MRc78a9WpSzRemuA5ufryEhCVob7rCoh7pH+EyBLo363a4+uhdHoGUHGCFTLYE+kh5myW8HpFLW1YN9+ifhmt4FzS4QQ8b0cBHk85aGlku28LbR0zfU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776406287; c=relaxed/simple; bh=2EHIpNiSQOvDao9ENEGwgn3WieRzrgdPXVweOZ5ti+I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=EE37wX+EudKZaXXnYKAGE+zhh+QukbC/JNQnvm9CoFPOgAj8F2hda9sKIdxBP4pfqr0n8VxwYllxCWu2FLIGbedgITL4AMDul2g11sohr0viXbSuytt60/uQ+nj9JLO/op74pTZykCrPqu8vq5C+XFReR3VPSeibhUg6tlSlTqk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rS9uuY2C; 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="rS9uuY2C" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 729AAC2BCC9; Fri, 17 Apr 2026 06:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776406287; bh=2EHIpNiSQOvDao9ENEGwgn3WieRzrgdPXVweOZ5ti+I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rS9uuY2CAFiLuwezRToKsBFgA7JIJ2URqKSokuTjPjWcEqP42XF+WUaV9bEH/5w6Z WJ+9HxQLzquMKIJu9ML+LvjvAXoq5Bib8HDZQ3X03w+TauwHsePYZS2wZJJ10q/pna sa0HkobyEpQcJV524+jrkdOH+l3C9rsmFJZhN+ldZbnAcAkCrerWudncU4E9iP2h49 vJbEQhwa6yDnfsaV0OEvNd/mQI1WtWZ9P9e61os4FEUYMwqH8tNo5+yIhs8jVSvJFY BUc2M2SIsYxlhZgjizl7gkSScW+BpI3CCpi/9NAQi0dWNQdzu8PeB9/Q/VJ7QdQYLS 6V5vDiz0Wqz/A== Received: from mchehab by mail.kernel.org with local (Exim 4.99.1) (envelope-from ) id 1wDcQH-0000000H8t5-344q; Fri, 17 Apr 2026 08:11:25 +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, Dan Williams , Randy Dunlap , Shuah Khan Subject: [PATCH v2 11/11] docs: maintainers_include: parse MAINTAINERS just once Date: Fri, 17 Apr 2026 08:11:21 +0200 Message-ID: <85da1a310479306c712260a74ce805be6aff2df2.1776405189.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 Reviewed-by: Randy Dunlap Suggested-by: Dan Williams Tested-by: Randy Dunlap --- 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