From nobody Mon Feb 9 03:17:20 2026 Received: from ms.lwn.net (ms.lwn.net [45.79.88.28]) (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 A5C923A4AD5; Wed, 14 Jan 2026 16:41:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.79.88.28 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768408919; cv=none; b=OWSullunHKk+4qDhPLZvEt/xKR09gta5IjoOOaNzHcLdkeXHqsRz2CkpddNGrWqMO819jZXCBE9rgvPRfGFNAodk931ny9wGiw63DyT2lO/Z0NH27YYbnMhMPe/Jvom30GclBiwJvLagrawsjjS3+QrefUSg4dXizWgVAnCsPYU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768408919; c=relaxed/simple; bh=AQkH/OLIxCFJ3Q5OoG/k2Bg1TJzlQxHovfPCD8xaC40=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZhrA9HGxlOmEJfaJuEkmpz8OzWUpveeZULYQdeeE6EP+1LysroAzUK/s/khVvF67qeWaiw3u5/UQIFs7jM2CcZnJi8PHfhT/La0cjhWaP1OTNhLGO637XTywCTlSsQPWPK1KnWwioYY1uopL06FfKtay6u1YO7zaq1Nl/BLi/x0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net; spf=pass smtp.mailfrom=lwn.net; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b=cb++FGFn; arc=none smtp.client-ip=45.79.88.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lwn.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b="cb++FGFn" DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net B291A40C99 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1768408918; bh=YR7wE92m8b+VtZXSHAA14p3og2uuU3TG64wNzT6CqMU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cb++FGFn56nNMECRkhsOiZfSi/OglUZoHGXg+9rrhrjLyUay34uvkvHRZkAMoCY8a H6cf002GcBBZuH8ruO0aIpvJzNZ5mFYPP2cu5vbcz+uEZC4bFJWBn4dStyVLChM/LK hY/y2YE5srJe8cS/+aPbK2Y5S9hQ+E9I2vQGWY5nNU1XgpCuBv5VGOBwR4yHkTmeXV a2nSGqXg/gLd1cmX65/YRvFcJEa7oRO6S6GhWOGTZiWzJfD4CR4Vz4w01Jz7oWgaH3 AzS0csMDLEAXd8LtX+0qhuEa8TV/MLxyZ4K1sV9haafG2HKAS+uZmxLQTMdpAfnO1B eC960Gzzp1ztw== Received: from trenco.lwn.net (unknown [IPv6:2601:280:4600:27b::1fe]) by ms.lwn.net (Postfix) with ESMTPA id B291A40C99; Wed, 14 Jan 2026 16:41:57 +0000 (UTC) From: Jonathan Corbet To: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Akira Yokosawa , Shuah Khan , Jani Nikula , Jonathan Corbet Subject: [PATCH 1/2] docs: kdoc: remove support for an external kernel-doc from sphinx Date: Wed, 14 Jan 2026 09:41:43 -0700 Message-ID: <20260114164146.532916-2-corbet@lwn.net> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260114164146.532916-1-corbet@lwn.net> References: <20260114164146.532916-1-corbet@lwn.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The ability to build the docs with an external kernel-doc program involves some truly confusing logic and complicates the task of moving kernel-doc out of scripts/. But this feature is not useful for normal documentation builds, and the external kernel-doc can always be run by hand when it needs debugging. So just remove that feature and make life easier. There is still a bunch of logic to build a command line that we never use; the idea is to be able to output it, but I'm not sure if that is worth keeping. Signed-off-by: Jonathan Corbet Reviewed-by: Mauro Carvalho Chehab --- Documentation/sphinx/kerneldoc.py | 53 ++++--------------------------- 1 file changed, 6 insertions(+), 47 deletions(-) diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerne= ldoc.py index d8cdf068ef35c..afbab458550a8 100644 --- a/Documentation/sphinx/kerneldoc.py +++ b/Documentation/sphinx/kerneldoc.py @@ -190,35 +190,7 @@ class KernelDocDirective(Directive): =20 return cmd =20 - def run_cmd(self, cmd): - """ - Execute an external kernel-doc command. - """ - - env =3D self.state.document.settings.env - node =3D nodes.section() - - p =3D subprocess.Popen(cmd, stdout=3Dsubprocess.PIPE, stderr=3Dsub= process.PIPE) - out, err =3D p.communicate() - - out, err =3D codecs.decode(out, 'utf-8'), codecs.decode(err, 'utf-= 8') - - if p.returncode !=3D 0: - sys.stderr.write(err) - - logger.warning("kernel-doc '%s' failed with return code %d" - % (" ".join(cmd), p.returncode)) - return [nodes.error(None, nodes.paragraph(text =3D "kernel-doc= missing"))] - elif env.config.kerneldoc_verbosity > 0: - sys.stderr.write(err) - - filenames =3D self.parse_args["file_list"] - for filename in filenames: - self.parse_msg(filename, node, out, cmd) - - return node.children - - def parse_msg(self, filename, node, out, cmd): + def parse_msg(self, filename, node, out): """ Handles a kernel-doc output for a given file """ @@ -244,7 +216,7 @@ class KernelDocDirective(Directive): =20 self.do_parse(result, node) =20 - def run_kdoc(self, cmd, kfiles): + def run_kdoc(self, kfiles): """ Execute kernel-doc classes directly instead of running as a separa= te command. @@ -258,23 +230,17 @@ class KernelDocDirective(Directive): filenames =3D self.parse_args["file_list"] =20 for filename, out in kfiles.msg(**self.msg_args, filenames=3Dfilen= ames): - self.parse_msg(filename, node, out, cmd) + self.parse_msg(filename, node, out) =20 return node.children =20 def run(self): - global kfiles - cmd =3D self.handle_args() if self.verbose >=3D 1: logger.info(cmd_str(cmd)) =20 try: - if kfiles: - return self.run_kdoc(cmd, kfiles) - else: - return self.run_cmd(cmd) - + return self.run_kdoc(kfiles) except Exception as e: # pylint: disable=3DW0703 logger.warning("kernel-doc '%s' processing failed with: %s" % (cmd_str(cmd), pformat(e))) @@ -286,15 +252,8 @@ class KernelDocDirective(Directive): =20 def setup_kfiles(app): global kfiles - - kerneldoc_bin =3D app.env.config.kerneldoc_bin - - if kerneldoc_bin and kerneldoc_bin.endswith("kernel-doc.py"): - print("Using Python kernel-doc") - out_style =3D RestFormat() - kfiles =3D KernelFiles(out_style=3Dout_style, logger=3Dlogger) - else: - print(f"Using {kerneldoc_bin}") + out_style =3D RestFormat() + kfiles =3D KernelFiles(out_style=3Dout_style, logger=3Dlogger) =20 =20 def setup(app): --=20 2.52.0 From nobody Mon Feb 9 03:17:20 2026 Received: from ms.lwn.net (ms.lwn.net [45.79.88.28]) (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 BB0FA3A4F2E; Wed, 14 Jan 2026 16:41:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.79.88.28 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768408921; cv=none; b=kU+wZtsPQ3GNRycBsofAyyN9daPIGkHTBm8NEfgKz389mtgSrjZTUov0G8xrif5DArp1JryHmiT3cPtcvcNclsgpWFsUDzllNoO18c2FMjsiiqQ95UBPSjp1fH/fKJOkeC1aaXAy/cUHAJftiMKOq54ccuCuKe98QbNMTiO/XA0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768408921; c=relaxed/simple; bh=SX1sa8CiqOBBWhpbhpIXX3id/ld04Q1Rs7bqSyJg+As=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jQBlnZ/P1nxChcyVdYW2VYvJBDO29rCkoGXVE60ZO3Wqyi0J7R5V2oFaM5aN+/a6hDZ9zfNk88x4FcWuJlfrSg1FMxNu+lC6nCH5IYtYEHg8F5M44DsQtUHSGPuc8d7no4iotunxjSg/WxOEe5RVUcQLNnAhSG7IKaIDO9CNGjA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net; spf=pass smtp.mailfrom=lwn.net; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b=Vre51E+j; arc=none smtp.client-ip=45.79.88.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lwn.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b="Vre51E+j" DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 60AD940C9A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1768408918; bh=3KOvvozDmCpKfbGUoA+YZq8QeW7SfmkTQKClfqAjp7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vre51E+jZTOnSFQPXUM770ItxPhrpI9IJ90zlv9QVo75mjDrnz6MOO8bezxV5zXVp O7NIA1FCr7UB+1xFUQwU1qvRamY3LrolIJwNqzOX/StC1cc/2Mg5A57O8a4ghXWebr VzIWAknuOOmo1Oseuc1TsR9Mov7P8fpNk6oXfbC/AW9Op8NoXv0x3XV2mZwVw/7w6S sbwXBEN374p+Y/g8st2SV0vKjbGjMJ/SGI62jOo27x1muE9/nvEleVkG+fFQ/Q7d7y tQ18s1XE+8h+4gPDJH/9V38IQSPUA/ge71xPuMftXxqC4RVC72ijWFqEU/adlf1PPB k5hduncS0J9hg== Received: from trenco.lwn.net (unknown [IPv6:2601:280:4600:27b::1fe]) by ms.lwn.net (Postfix) with ESMTPA id 60AD940C9A; Wed, 14 Jan 2026 16:41:58 +0000 (UTC) From: Jonathan Corbet To: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Akira Yokosawa , Shuah Khan , Jani Nikula , Jonathan Corbet Subject: [PATCH 2/2] Move kernel-doc to tools/docs Date: Wed, 14 Jan 2026 09:41:44 -0700 Message-ID: <20260114164146.532916-3-corbet@lwn.net> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260114164146.532916-1-corbet@lwn.net> References: <20260114164146.532916-1-corbet@lwn.net> 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 kernel-doc is the last documentation-related tool still living outside of the tools/docs directory; the time has come to move it over. Signed-off-by: Jonathan Corbet --- Documentation/conf.py | 2 +- Documentation/doc-guide/kernel-doc.rst | 8 ++++---- Documentation/kbuild/kbuild.rst | 2 +- Documentation/process/coding-style.rst | 2 +- .../translations/it_IT/doc-guide/kernel-doc.rst | 8 ++++---- .../translations/sp_SP/process/coding-style.rst | 2 +- .../translations/zh_CN/doc-guide/kernel-doc.rst | 10 +++++----- Documentation/translations/zh_CN/kbuild/kbuild.rst | 2 +- .../translations/zh_CN/process/coding-style.rst | 2 +- .../translations/zh_TW/process/coding-style.rst | 2 +- MAINTAINERS | 2 -- Makefile | 2 +- drivers/gpu/drm/i915/Makefile | 2 +- scripts/kernel-doc | 1 - tools/docs/find-unused-docs.sh | 2 +- scripts/kernel-doc.py =3D> tools/docs/kernel-doc | 0 tools/docs/sphinx-build-wrapper | 2 +- 17 files changed, 24 insertions(+), 27 deletions(-) delete mode 120000 scripts/kernel-doc rename scripts/kernel-doc.py =3D> tools/docs/kernel-doc (100%) diff --git a/Documentation/conf.py b/Documentation/conf.py index 1ea2ae5c6276c..383d5e5b9d0af 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -582,7 +582,7 @@ pdf_documents =3D [ # kernel-doc extension configuration for running Sphinx directly (e.g. by = Read # the Docs). In a normal build, these are supplied from the Makefile via c= ommand # line arguments. -kerneldoc_bin =3D "../scripts/kernel-doc.py" +kerneldoc_bin =3D "../tools/docs/kernel-doc" # Not used now kerneldoc_srctree =3D ".." =20 def setup(app): diff --git a/Documentation/doc-guide/kernel-doc.rst b/Documentation/doc-gui= de/kernel-doc.rst index b56128d7f5c3a..8d2c09fb36e4d 100644 --- a/Documentation/doc-guide/kernel-doc.rst +++ b/Documentation/doc-guide/kernel-doc.rst @@ -54,7 +54,7 @@ Running the ``kernel-doc`` tool with increased verbosity = and without actual output generation may be used to verify proper formatting of the documentation comments. For example:: =20 - scripts/kernel-doc -v -none drivers/foo/bar.c + tools/docs/kernel-doc -v -none drivers/foo/bar.c =20 The documentation format of ``.c`` files is also verified by the kernel bu= ild when it is requested to perform extra gcc checks:: @@ -365,7 +365,7 @@ differentiated by whether the macro name is immediately= followed by a left parenthesis ('(') for function-like macros or not followed by one for object-like macros. =20 -Function-like macros are handled like functions by ``scripts/kernel-doc``. +Function-like macros are handled like functions by ``tools/docs/kernel-doc= ``. They may have a parameter list. Object-like macros have do not have a parameter list. =20 @@ -596,8 +596,8 @@ from the source file. =20 The kernel-doc extension is included in the kernel source tree, at ``Documentation/sphinx/kerneldoc.py``. Internally, it uses the -``scripts/kernel-doc`` script to extract the documentation comments from t= he -source. +``tools/docs/kernel-doc`` script to extract the documentation comments from +the source. =20 .. _kernel_doc: =20 diff --git a/Documentation/kbuild/kbuild.rst b/Documentation/kbuild/kbuild.= rst index 82826b0332df4..5a9013bacfb75 100644 --- a/Documentation/kbuild/kbuild.rst +++ b/Documentation/kbuild/kbuild.rst @@ -180,7 +180,7 @@ architecture. KDOCFLAGS --------- Specify extra (warning/error) flags for kernel-doc checks during the build, -see scripts/kernel-doc for which flags are supported. Note that this doesn= 't +see tools/docs/kernel-doc for which flags are supported. Note that this do= esn't (currently) apply to documentation builds. =20 ARCH diff --git a/Documentation/process/coding-style.rst b/Documentation/process= /coding-style.rst index 258158637f654..35b381230f6e4 100644 --- a/Documentation/process/coding-style.rst +++ b/Documentation/process/coding-style.rst @@ -614,7 +614,7 @@ it. =20 When commenting the kernel API functions, please use the kernel-doc format. See the files at :ref:`Documentation/doc-guide/ ` and -``scripts/kernel-doc`` for details. Note that the danger of over-commenting +``tools/docs/kernel-doc`` for details. Note that the danger of over-commen= ting applies to kernel-doc comments all the same. Do not add boilerplate kernel-doc which simply reiterates what's obvious from the signature of the function. diff --git a/Documentation/translations/it_IT/doc-guide/kernel-doc.rst b/Do= cumentation/translations/it_IT/doc-guide/kernel-doc.rst index aa0e31d353d6f..bac959b8b7b96 100644 --- a/Documentation/translations/it_IT/doc-guide/kernel-doc.rst +++ b/Documentation/translations/it_IT/doc-guide/kernel-doc.rst @@ -80,7 +80,7 @@ Al fine di verificare che i commenti siano formattati cor= rettamente, potete eseguire il programma ``kernel-doc`` con un livello di verbosit=C3=A0 alto= e senza che questo produca alcuna documentazione. Per esempio:: =20 - scripts/kernel-doc -v -none drivers/foo/bar.c + tools/docs/kernel-doc -v -none drivers/foo/bar.c =20 Il formato della documentazione =C3=A8 verificato della procedura di gener= azione del kernel quando viene richiesto di effettuare dei controlli extra con GC= C:: @@ -378,7 +378,7 @@ distinguono in base al fatto che il nome della macro si= mile a funzione sia immediatamente seguito da una parentesi sinistra ('(') mentre in quelle si= mili a oggetti no. =20 -Le macro simili a funzioni sono gestite come funzioni da ``scripts/kernel-= doc``. +Le macro simili a funzioni sono gestite come funzioni da ``tools/docs/kern= el-doc``. Possono avere un elenco di parametri. Le macro simili a oggetti non hanno = un elenco di parametri. =20 @@ -595,7 +595,7 @@ documentazione presenti nel file sorgente (*source*). =20 L'estensione kernel-doc fa parte dei sorgenti del kernel, la si pu=C3=B2 t= rovare in ``Documentation/sphinx/kerneldoc.py``. Internamente, viene utilizzato -lo script ``scripts/kernel-doc`` per estrarre i commenti di documentazione +lo script ``tools/docs/kernel-doc`` per estrarre i commenti di documentazi= one dai file sorgenti. =20 Come utilizzare kernel-doc per generare pagine man @@ -604,4 +604,4 @@ Come utilizzare kernel-doc per generare pagine man Se volete utilizzare kernel-doc solo per generare delle pagine man, potete farlo direttamente dai sorgenti del kernel:: =20 - $ scripts/kernel-doc -man $(git grep -l '/\*\*' -- :^Documentation :^too= ls) | scripts/split-man.pl /tmp/man + $ tools/docs/kernel-doc -man $(git grep -l '/\*\*' -- :^Documentation :^= tools) | scripts/split-man.pl /tmp/man diff --git a/Documentation/translations/sp_SP/process/coding-style.rst b/Do= cumentation/translations/sp_SP/process/coding-style.rst index 025223be9706d..7d63aa8426e63 100644 --- a/Documentation/translations/sp_SP/process/coding-style.rst +++ b/Documentation/translations/sp_SP/process/coding-style.rst @@ -633,7 +633,7 @@ posiblemente POR QU=C3=89 hace esto. =20 Al comentar las funciones de la API del kernel, utilice el formato kernel-doc. Consulte los archivos en :ref:`Documentation/doc-guide/ ` -y ``scripts/kernel-doc`` para m=C3=A1s detalles. +y ``tools/docs/kernel-doc`` para m=C3=A1s detalles. =20 El estilo preferido para comentarios largos (de varias l=C3=ADneas) es: =20 diff --git a/Documentation/translations/zh_CN/doc-guide/kernel-doc.rst b/Do= cumentation/translations/zh_CN/doc-guide/kernel-doc.rst index ccfb9b8329c23..fb2bbaaa85c18 100644 --- a/Documentation/translations/zh_CN/doc-guide/kernel-doc.rst +++ b/Documentation/translations/zh_CN/doc-guide/kernel-doc.rst @@ -43,7 +43,7 @@ kernel-doc=E6=B3=A8=E9=87=8A=E7=94=A8 ``/**`` =E4=BD=9C= =E4=B8=BA=E5=BC=80=E5=A7=8B=E6=A0=87=E8=AE=B0=E3=80=82 ``kernel-doc`` =E5= =B7=A5=E5=85=B7=E5=B0=86=E6=8F=90=E5=8F=96 =E7=94=A8=E8=AF=A6=E7=BB=86=E6=A8=A1=E5=BC=8F=E5=92=8C=E4=B8=8D=E7=94=9F= =E6=88=90=E5=AE=9E=E9=99=85=E8=BE=93=E5=87=BA=E6=9D=A5=E8=BF=90=E8=A1=8C ``= kernel-doc`` =E5=B7=A5=E5=85=B7=EF=BC=8C=E5=8F=AF=E4=BB=A5=E9=AA=8C=E8=AF= =81=E6=96=87=E6=A1=A3=E6=B3=A8=E9=87=8A=E7=9A=84=E6=A0=BC=E5=BC=8F =E6=98=AF=E5=90=A6=E6=AD=A3=E7=A1=AE=E3=80=82=E4=BE=8B=E5=A6=82:: =20 - scripts/kernel-doc -v -none drivers/foo/bar.c + tools/docs/kernel-doc -v -none drivers/foo/bar.c =20 =E5=BD=93=E8=AF=B7=E6=B1=82=E6=89=A7=E8=A1=8C=E9=A2=9D=E5=A4=96=E7=9A=84gc= c=E6=A3=80=E6=9F=A5=E6=97=B6=EF=BC=8C=E5=86=85=E6=A0=B8=E6=9E=84=E5=BB=BA= =E5=B0=86=E9=AA=8C=E8=AF=81=E6=96=87=E6=A1=A3=E6=A0=BC=E5=BC=8F:: =20 @@ -473,7 +473,7 @@ doc: *title* =E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89=E9=80=89=E9=A1=B9=EF=BC=8Ckernel-doc= =E6=8C=87=E4=BB=A4=E5=B0=86=E5=8C=85=E5=90=AB=E6=BA=90=E6=96=87=E4=BB=B6=E4= =B8=AD=E7=9A=84=E6=89=80=E6=9C=89=E6=96=87=E6=A1=A3=E6=B3=A8=E9=87=8A=E3=80= =82 =20 kernel-doc=E6=89=A9=E5=B1=95=E5=8C=85=E5=90=AB=E5=9C=A8=E5=86=85=E6=A0=B8= =E6=BA=90=E4=BB=A3=E7=A0=81=E6=A0=91=E4=B8=AD=EF=BC=8C=E4=BD=8D=E4=BA=8E ``= Documentation/sphinx/kerneldoc.py`` =E3=80=82 -=E5=9C=A8=E5=86=85=E9=83=A8=EF=BC=8C=E5=AE=83=E4=BD=BF=E7=94=A8 ``scripts/= kernel-doc`` =E8=84=9A=E6=9C=AC=E4=BB=8E=E6=BA=90=E4=BB=A3=E7=A0=81=E4=B8= =AD=E6=8F=90=E5=8F=96=E6=96=87=E6=A1=A3=E6=B3=A8=E9=87=8A=E3=80=82 +=E5=9C=A8=E5=86=85=E9=83=A8=EF=BC=8C=E5=AE=83=E4=BD=BF=E7=94=A8 ``tools/do= cs/kernel-doc`` =E8=84=9A=E6=9C=AC=E4=BB=8E=E6=BA=90=E4=BB=A3=E7=A0=81=E4= =B8=AD=E6=8F=90=E5=8F=96=E6=96=87=E6=A1=A3=E6=B3=A8=E9=87=8A=E3=80=82 =20 .. _kernel_doc_zh: =20 @@ -482,18 +482,18 @@ kernel-doc=E6=89=A9=E5=B1=95=E5=8C=85=E5=90=AB=E5=9C= =A8=E5=86=85=E6=A0=B8=E6=BA=90=E4=BB=A3=E7=A0=81=E6=A0=91=E4=B8=AD=EF=BC=8C= =E4=BD=8D=E4=BA=8E ``Documentation/sphinx/k =20 =E5=A6=82=E6=9E=9C=E6=82=A8=E5=8F=AA=E6=83=B3=E4=BD=BF=E7=94=A8kernel-doc= =E7=94=9F=E6=88=90=E6=89=8B=E5=86=8C=E9=A1=B5=EF=BC=8C=E5=8F=AF=E4=BB=A5=E4= =BB=8E=E5=86=85=E6=A0=B8git=E6=A0=91=E8=BF=99=E6=A0=B7=E5=81=9A:: =20 - $ scripts/kernel-doc -man \ + $ tools/docs/kernel-doc -man \ $(git grep -l '/\*\*' -- :^Documentation :^tools) \ | scripts/split-man.pl /tmp/man =20 =E4=B8=80=E4=BA=9B=E6=97=A7=E7=89=88=E6=9C=AC=E7=9A=84git=E4=B8=8D=E6=94= =AF=E6=8C=81=E8=B7=AF=E5=BE=84=E6=8E=92=E9=99=A4=E8=AF=AD=E6=B3=95=E7=9A=84= =E6=9F=90=E4=BA=9B=E5=8F=98=E4=BD=93=E3=80=82 =E4=BB=A5=E4=B8=8B=E5=91=BD=E4=BB=A4=E4=B9=8B=E4=B8=80=E5=8F=AF=E8=83=BD= =E9=80=82=E7=94=A8=E4=BA=8E=E8=BF=99=E4=BA=9B=E7=89=88=E6=9C=AC:: =20 - $ scripts/kernel-doc -man \ + $ tools/docs/kernel-doc -man \ $(git grep -l '/\*\*' -- . ':!Documentation' ':!tools') \ | scripts/split-man.pl /tmp/man =20 - $ scripts/kernel-doc -man \ + $ tools/docs/kernel-doc -man \ $(git grep -l '/\*\*' -- . ":(exclude)Documentation" ":(exclude)tools"= ) \ | scripts/split-man.pl /tmp/man =20 diff --git a/Documentation/translations/zh_CN/kbuild/kbuild.rst b/Documenta= tion/translations/zh_CN/kbuild/kbuild.rst index 57f5cf5b2cddb..a477b4b089585 100644 --- a/Documentation/translations/zh_CN/kbuild/kbuild.rst +++ b/Documentation/translations/zh_CN/kbuild/kbuild.rst @@ -174,7 +174,7 @@ UTS_MACHINE =E5=8F=98=E9=87=8F=EF=BC=88=E5=9C=A8=E6=9F= =90=E4=BA=9B=E6=9E=B6=E6=9E=84=E4=B8=AD=E8=BF=98=E5=8C=85=E6=8B=AC=E5=86=85= =E6=A0=B8=E9=85=8D=E7=BD=AE=EF=BC=89=E6=9D=A5=E7=8C=9C=E6=B5=8B=E6=AD=A3=E7= =A1=AE KDOCFLAGS --------- =E6=8C=87=E5=AE=9A=E5=9C=A8=E6=9E=84=E5=BB=BA=E8=BF=87=E7=A8=8B=E4=B8=AD= =E7=94=A8=E4=BA=8E kernel-doc =E6=A3=80=E6=9F=A5=E7=9A=84=E9=A2=9D=E5=A4=96= =EF=BC=88=E8=AD=A6=E5=91=8A/=E9=94=99=E8=AF=AF=EF=BC=89=E6=A0=87=E5=BF=97= =EF=BC=8C=E6=9F=A5=E7=9C=8B -scripts/kernel-doc =E4=BA=86=E8=A7=A3=E6=94=AF=E6=8C=81=E7=9A=84=E6=A0=87= =E5=BF=97=E3=80=82=E8=AF=B7=E6=B3=A8=E6=84=8F=EF=BC=8C=E8=BF=99=E7=9B=AE=E5= =89=8D=E4=B8=8D=E9=80=82=E7=94=A8=E4=BA=8E=E6=96=87=E6=A1=A3=E6=9E=84=E5=BB= =BA=E3=80=82 +tools/docs/kernel-doc =E4=BA=86=E8=A7=A3=E6=94=AF=E6=8C=81=E7=9A=84=E6=A0= =87=E5=BF=97=E3=80=82=E8=AF=B7=E6=B3=A8=E6=84=8F=EF=BC=8C=E8=BF=99=E7=9B=AE= =E5=89=8D=E4=B8=8D=E9=80=82=E7=94=A8=E4=BA=8E=E6=96=87=E6=A1=A3=E6=9E=84=E5= =BB=BA=E3=80=82 =20 ARCH ---- diff --git a/Documentation/translations/zh_CN/process/coding-style.rst b/Do= cumentation/translations/zh_CN/process/coding-style.rst index 0484d0c65c25b..5a342a024c01e 100644 --- a/Documentation/translations/zh_CN/process/coding-style.rst +++ b/Documentation/translations/zh_CN/process/coding-style.rst @@ -545,7 +545,7 @@ Linux =E9=87=8C=E8=BF=99=E6=98=AF=E6=8F=90=E5=80=A1=E7= =9A=84=E5=81=9A=E6=B3=95=EF=BC=8C=E5=9B=A0=E4=B8=BA=E8=BF=99=E6=A0=B7=E5=8F= =AF=E4=BB=A5=E5=BE=88=E7=AE=80=E5=8D=95=E7=9A=84=E7=BB=99=E8=AF=BB=E8=80=85= =E6=8F=90=E4=BE=9B =E4=B9=9F=E5=8F=AF=E4=BB=A5=E5=8A=A0=E4=B8=8A=E5=AE=83=E5=81=9A=E8=BF=99= =E4=BA=9B=E4=BA=8B=E6=83=85=E7=9A=84=E5=8E=9F=E5=9B=A0=E3=80=82 =20 =E5=BD=93=E6=B3=A8=E9=87=8A=E5=86=85=E6=A0=B8 API =E5=87=BD=E6=95=B0=E6=97= =B6=EF=BC=8C=E8=AF=B7=E4=BD=BF=E7=94=A8 kernel-doc =E6=A0=BC=E5=BC=8F=E3=80= =82=E8=AF=A6=E8=A7=81 -Documentation/translations/zh_CN/doc-guide/index.rst =E5=92=8C scripts/ker= nel-doc =E3=80=82 +Documentation/translations/zh_CN/doc-guide/index.rst =E5=92=8C tools/docs/= kernel-doc =E3=80=82 =20 =E9=95=BF (=E5=A4=9A=E8=A1=8C) =E6=B3=A8=E9=87=8A=E7=9A=84=E9=A6=96=E9=80= =89=E9=A3=8E=E6=A0=BC=E6=98=AF=EF=BC=9A =20 diff --git a/Documentation/translations/zh_TW/process/coding-style.rst b/Do= cumentation/translations/zh_TW/process/coding-style.rst index 311c6f6bad0bc..e2ba97b3d8bbf 100644 --- a/Documentation/translations/zh_TW/process/coding-style.rst +++ b/Documentation/translations/zh_TW/process/coding-style.rst @@ -548,7 +548,7 @@ Linux =E8=A3=8F=E9=80=99=E6=98=AF=E6=8F=90=E5=80=A1=E7= =9A=84=E5=81=9A=E6=B3=95=EF=BC=8C=E5=9B=A0=E7=88=B2=E9=80=99=E6=A8=A3=E5=8F= =AF=E4=BB=A5=E5=BE=88=E7=B0=A1=E5=96=AE=E7=9A=84=E7=B5=A6=E8=AE=80=E8=80=85= =E6=8F=90=E4=BE=9B =E4=B9=9F=E5=8F=AF=E4=BB=A5=E5=8A=A0=E4=B8=8A=E5=AE=83=E5=81=9A=E9=80=99= =E4=BA=9B=E4=BA=8B=E6=83=85=E7=9A=84=E5=8E=9F=E5=9B=A0=E3=80=82 =20 =E7=95=B6=E8=A8=BB=E9=87=8B=E5=85=A7=E6=A0=B8 API =E5=87=BD=E6=95=B8=E6=99= =82=EF=BC=8C=E8=AB=8B=E4=BD=BF=E7=94=A8 kernel-doc =E6=A0=BC=E5=BC=8F=E3=80= =82=E8=A9=B3=E8=A6=8B -Documentation/translations/zh_CN/doc-guide/index.rst =E5=92=8C scripts/ker= nel-doc =E3=80=82 +Documentation/translations/zh_CN/doc-guide/index.rst =E5=92=8C tools/docs/= kernel-doc =E3=80=82 =20 =E9=95=B7 (=E5=A4=9A=E8=A1=8C) =E8=A8=BB=E9=87=8B=E7=9A=84=E9=A6=96=E9=81= =B8=E9=A2=A8=E6=A0=BC=E6=98=AF=EF=BC=9A =20 diff --git a/MAINTAINERS b/MAINTAINERS index e03e33bd33b83..8ea68e7c2fa7a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7522,7 +7522,6 @@ S: Maintained P: Documentation/doc-guide/maintainer-profile.rst T: git git://git.lwn.net/linux.git docs-next F: Documentation/ -F: scripts/kernel-doc* F: tools/lib/python/* F: tools/docs/ F: tools/net/ynl/pyynl/lib/doc_generator.py @@ -7559,7 +7558,6 @@ M: Mauro Carvalho Chehab L: linux-doc@vger.kernel.org S: Maintained F: Documentation/sphinx/ -F: scripts/kernel-doc* F: tools/lib/python/* F: tools/docs/ =20 diff --git a/Makefile b/Makefile index 3cd00b62cde99..81a4ab11256ce 100644 --- a/Makefile +++ b/Makefile @@ -460,7 +460,7 @@ HOSTPKG_CONFIG =3D pkg-config =20 # the KERNELDOC macro needs to be exported, as scripts/Makefile.build # has a logic to call it -KERNELDOC =3D $(srctree)/scripts/kernel-doc.py +KERNELDOC =3D $(srctree)/tools/docs/kernel-doc export KERNELDOC =20 KBUILD_USERHOSTCFLAGS :=3D -Wall -Wmissing-prototypes -Wstrict-prototypes \ diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 4db24050edb0e..c979c579de66f 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -443,7 +443,7 @@ always-$(CONFIG_DRM_I915_WERROR) +=3D \ =20 quiet_cmd_hdrtest =3D HDRTEST $(patsubst %.hdrtest,%.h,$@) cmd_hdrtest =3D $(CC) $(filter-out $(CFLAGS_GCOV), $(c_flags)) -S -o= /dev/null -x c /dev/null -include $<; \ - $(srctree)/scripts/kernel-doc -none -Werror $<; touch $@ + $(KERNELDOC) -none -Werror $<; touch $@ =20 $(obj)/%.hdrtest: $(src)/%.h FORCE $(call if_changed_dep,hdrtest) diff --git a/scripts/kernel-doc b/scripts/kernel-doc deleted file mode 120000 index 3b6ef807791a2..0000000000000 --- a/scripts/kernel-doc +++ /dev/null @@ -1 +0,0 @@ -kernel-doc.py \ No newline at end of file diff --git a/tools/docs/find-unused-docs.sh b/tools/docs/find-unused-docs.sh index ca4e607ec3f72..53514c759dc1b 100755 --- a/tools/docs/find-unused-docs.sh +++ b/tools/docs/find-unused-docs.sh @@ -54,7 +54,7 @@ for file in `find $1 -name '*.c'`; do if [[ ${FILES_INCLUDED[$file]+_} ]]; then continue; fi - str=3D$(PYTHONDONTWRITEBYTECODE=3D1 scripts/kernel-doc -export "$file" 2>= /dev/null) + str=3D$(PYTHONDONTWRITEBYTECODE=3D1 tools/docs/kernel-doc -export "$file"= 2>/dev/null) if [[ -n "$str" ]]; then echo "$file" fi diff --git a/scripts/kernel-doc.py b/tools/docs/kernel-doc similarity index 100% rename from scripts/kernel-doc.py rename to tools/docs/kernel-doc diff --git a/tools/docs/sphinx-build-wrapper b/tools/docs/sphinx-build-wrap= per index 7a5fcef254297..cb2a5005e633f 100755 --- a/tools/docs/sphinx-build-wrapper +++ b/tools/docs/sphinx-build-wrapper @@ -246,7 +246,7 @@ class SphinxBuilder: # self.sphinxbuild =3D os.environ.get("SPHINXBUILD", "sphinx-build") self.kerneldoc =3D self.get_path(os.environ.get("KERNELDOC", - "scripts/kernel-doc.= py")) + "tools/docs/kernel-d= oc")) self.builddir =3D self.get_path(builddir, use_cwd=3DTrue, abs_path= =3DTrue) =20 # --=20 2.52.0