From nobody Mon Jun 22 08:23:24 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEFC6C433EF for ; Sat, 26 Mar 2022 10:28:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232634AbiCZK3h (ORCPT ); Sat, 26 Mar 2022 06:29:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232539AbiCZK3G (ORCPT ); Sat, 26 Mar 2022 06:29:06 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E3565D5C3; Sat, 26 Mar 2022 03:27:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CC5EFB802C3; Sat, 26 Mar 2022 10:27:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D1A0C340EE; Sat, 26 Mar 2022 10:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648290447; bh=fCUCDroTYXYqWyLmO/RKepuGt/+Ob6vZ/0OEXNI48dc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rOn18vpF92boutfkaYVD/c+vPT9O1nXmghUBSb3aUkzl+ZF2+8cXkabG0nKqvg9p1 cwMpZ8koUid5xCsgO/5yeyZUe2/ipOzBiVC0pdD850PeDgvVfD5J/HzKswBWiq7G9f PyXLq/JVFtFwpOIYI/8vHJ1PHcXoeGbtVdX49t72mienTt35Qukui5lU4Ii1uTLYD0 kgKP/8qgK2O4DJ3I3Q6UDIyElESTA8horrFgXOC6yHr8pyScM0PnO//31D5ZjwGJHg //1ZeelDVSI14zc8yuS9DqFDZG6EVTFrYAKqSd1r17DgQOtCsuOiRIQ6PCD4YcLK9t Kr/4cuoU+8AqQ== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1nY3dl-00Co0U-20; Sat, 26 Mar 2022 11:27:25 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , "Hans de Goede" , "Stephen Rothwell" , linux-kernel@vger.kernel.org Subject: [PATCH v3 1/6] scripts/get_feat.pl: allow output the parsed file names Date: Sat, 26 Mar 2022 11:27:19 +0100 Message-Id: <11b438ee01e00c866f5ea197d6aecc26e9f86945.1648290305.git.mchehab@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Such output could be helpful while debugging it, but its main goal is to tell kernel_feat.py about what files were used by the script. Thie way, kernel_feat.py can add those as documentation dependencies. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C= /C on the cover. See [PATCH v3 0/6] at: https://lore.kernel.org/all/cover.1648290305.git.mch= ehab@kernel.org/ scripts/get_feat.pl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/get_feat.pl b/scripts/get_feat.pl index 457712355676..76cfb96b59b6 100755 --- a/scripts/get_feat.pl +++ b/scripts/get_feat.pl @@ -13,6 +13,7 @@ my $man; my $debug; my $arch; my $feat; +my $enable_fname; =20 my $basename =3D abs_path($0); $basename =3D~ s,/[^/]+$,/,; @@ -31,6 +32,7 @@ GetOptions( 'arch=3Ds' =3D> \$arch, 'feat=3Ds' =3D> \$feat, 'feature=3Ds' =3D> \$feat, + "enable-fname" =3D> \$enable_fname, man =3D> \$man ) or pod2usage(2); =20 @@ -95,6 +97,10 @@ sub parse_feat { return if ($file =3D~ m,($prefix)/arch-support.txt,); return if (!($file =3D~ m,arch-support.txt$,)); =20 + if ($enable_fname) { + printf ".. FILE %s\n", abs_path($file); + } + my $subsys =3D ""; $subsys =3D $2 if ( m,.*($prefix)/([^/]+).*,); =20 @@ -580,6 +586,11 @@ Output features for a single specific feature. Changes the location of the Feature files. By default, it uses the Documentation/features directory. =20 +=3Ditem B<--enable-fname> + +Prints the file name of the feature files. This can be used in order to +track dependencies during documentation build. + =3Ditem B<--debug> =20 Put the script in verbose mode, useful for debugging. Can be called multip= le --=20 2.35.1 From nobody Mon Jun 22 08:23:24 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64ECCC433F5 for ; Sat, 26 Mar 2022 10:27:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232596AbiCZK3Z (ORCPT ); Sat, 26 Mar 2022 06:29:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232527AbiCZK3F (ORCPT ); Sat, 26 Mar 2022 06:29:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DA9B4F44E; Sat, 26 Mar 2022 03:27:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C26DA60B8A; Sat, 26 Mar 2022 10:27:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85EAFC34100; Sat, 26 Mar 2022 10:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648290447; bh=+MIt+athm81UOKvOGZ5ZQcQ4L0fnD6TdonEeO/0FhQM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dyyW0Q4+ZIt8W1n0J5Zg9uDJEsXLhDtBkhqVtrloMm5rBoY0azcmyRQRRH4xjmkYy hxdjaxIixFqpIsSl45hZDImEXpz6BaqyRh63ZHMEI167tqUZ5AnMQ6I6fQ23MaatD5 5JOjnZ8E1Nb7B8g3ucNapkZdbVOnEwb0dLqGLNeN8QvpZc6cxn6uPDSQBZG1DW6LJZ KYe0MZ2Sd6zbDRCJijvrGQtWG+6uWKEXy89V8cPhddONGxTz6ShcARMe+VOr+t6YQJ 7H4g54vPWEgJoZ+MAHdOYTsEZvrcbz/3B90oCmOK/IneGJDGASKxniIoW6wY5uBON/ rbsFtq38YWz0A== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1nY3dl-00Co0Y-3N; Sat, 26 Mar 2022 11:27:25 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , "Hans de Goede" , "Stephen Rothwell" , Randy Dunlap , linux-kernel@vger.kernel.org Subject: [PATCH v3 2/6] docs: kernel_feat.py: add build dependencies Date: Sat, 26 Mar 2022 11:27:20 +0100 Message-Id: <5cdf7a8300019129dcc09d4c2557f75908754445.1648290305.git.mchehab@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Ensure that the feature files will be regenerated if any changes happen at the Documentation/features files that were processed by gen_feat.pl. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C= /C on the cover. See [PATCH v3 0/6] at: https://lore.kernel.org/all/cover.1648290305.git.mch= ehab@kernel.org/ Documentation/sphinx/kernel_feat.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Documentation/sphinx/kernel_feat.py b/Documentation/sphinx/ker= nel_feat.py index 8138d69a6987..27b701ed3681 100644 --- a/Documentation/sphinx/kernel_feat.py +++ b/Documentation/sphinx/kernel_feat.py @@ -33,6 +33,7 @@ u""" =20 import codecs import os +import re import subprocess import sys =20 @@ -82,7 +83,7 @@ class KernelFeat(Directive): =20 env =3D doc.settings.env cwd =3D path.dirname(doc.current_source) - cmd =3D "get_feat.pl rest --dir " + cmd =3D "get_feat.pl rest --enable-fname --dir " cmd +=3D self.arguments[0] =20 if len(self.arguments) > 1: @@ -102,7 +103,22 @@ class KernelFeat(Directive): shell_env["srctree"] =3D srctree =20 lines =3D self.runCmd(cmd, shell=3DTrue, cwd=3Dcwd, env=3Dshell_en= v) - nodeList =3D self.nestedParse(lines, fname) + + line_regex =3D re.compile("^\.\. FILE (\S+)$") + + out_lines =3D "" + + for line in lines.split("\n"): + match =3D line_regex.search(line) + if match: + fname =3D match.group(1) + + # Add the file to Sphinx build dependencies + env.note_dependency(os.path.abspath(fname)) + else: + out_lines +=3D line + "\n" + + nodeList =3D self.nestedParse(out_lines, fname) return nodeList =20 def runCmd(self, cmd, **kwargs): --=20 2.35.1 From nobody Mon Jun 22 08:23:24 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21055C433EF for ; Sat, 26 Mar 2022 10:27:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232604AbiCZK31 (ORCPT ); Sat, 26 Mar 2022 06:29:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232525AbiCZK3F (ORCPT ); Sat, 26 Mar 2022 06:29:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 636994F479; Sat, 26 Mar 2022 03:27:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C274F60BA5; Sat, 26 Mar 2022 10:27:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96547C3410F; Sat, 26 Mar 2022 10:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648290447; bh=4xYDm8jiOGCxidWbMBbnubCB80y407Lrcoc3O9x9bTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XLn0aW4S35JWxm7QulfteOw5UXPdQW6wwkoUyPVUqB0Cv27GOnTzBSBmpXaZWnnq3 7Fw7rQn1+lmoe4lYFeMUMkHiV3S/mTandfR9G40O7bsxTyAZ8uoYHDYcindFUdugIZ VXFhs+FLd4BMvAV9MzM2s8uCur22o0bQhAvi4+9iFVPegS9JtJnJzwQlZckSnC8Lk+ wc7y5UjKyftmuvIisK5608iy1b2CJpmd6hsUI/G2nBzAWTnZnZWvltZpJF8r/MtsEw IhyChcKEFQFEAbh5j7lUZtgSdhizvApDwhRl9Vvqg7PMg/HoSDlcnXrizydSnfM1Ty +8Te195rzKcrQ== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1nY3dl-00Co0c-4x; Sat, 26 Mar 2022 11:27:25 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , "Hans de Goede" , "Stephen Rothwell" , Randy Dunlap , linux-kernel@vger.kernel.org Subject: [PATCH v3 3/6] docs: kernel_abi.py: add sphinx build dependencies Date: Sat, 26 Mar 2022 11:27:21 +0100 Message-Id: <10bc3d3bc74f514a539cd3b48b9d287d2b6f99e2.1648290305.git.mchehab@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Ensure that Sphinx-build will handle the files parsed by get_abi.pl as dependencies. This way, if they are touched, the ABI output will be regenerated. Reported-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C= /C on the cover. See [PATCH v3 0/6] at: https://lore.kernel.org/all/cover.1648290305.git.mch= ehab@kernel.org/ Documentation/sphinx/kernel_abi.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kern= el_abi.py index 4392b3cb4020..efab9b14a9f5 100644 --- a/Documentation/sphinx/kernel_abi.py +++ b/Documentation/sphinx/kernel_abi.py @@ -128,6 +128,7 @@ class KernelCmd(Directive): return out =20 def nestedParse(self, lines, fname): + env =3D self.state.document.settings.env content =3D ViewList() node =3D nodes.section() =20 @@ -154,6 +155,9 @@ class KernelCmd(Directive): self.do_parse(content, node) content =3D ViewList() =20 + # Add the file to Sphinx build dependencies + env.note_dependency(os.path.abspath(f)) + f =3D new_f =20 # sphinx counts lines from 0 --=20 2.35.1 From nobody Mon Jun 22 08:23:24 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 097A5C433EF for ; Sat, 26 Mar 2022 10:27:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232574AbiCZK3V (ORCPT ); Sat, 26 Mar 2022 06:29:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232521AbiCZK3E (ORCPT ); Sat, 26 Mar 2022 06:29:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C456755BD; Sat, 26 Mar 2022 03:27:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2E7C460B82; Sat, 26 Mar 2022 10:27:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81305C36AE5; Sat, 26 Mar 2022 10:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648290447; bh=/RJA2D1Ibpq79TzqVCMA7zkbXSOivMOodsfJk7S3Qmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q86UPSv8zRhM3lQr6i9Y9IkByBT9njgqHH+uLokHT9YsqWSPg2c/IIrDrdJtALKDI gi54RUQpqm3kKdyMEMd5oTIXyaKcxn+Ge+S2dxcbIEIHMMqMRhOLrIs+fnvthDuJGT kTZs+bhY82JoJizeT9DzZhvX1ShnylX2lcOlpVk4VTiXPJyaRAaNzFsDW3Mvxnvb6O CmEzu0Wp9OkjUc1RwrPgVgSR3pTgCVQZIY362ssJ2feCB+w6n4qFET0/qUdUZkm99s YbxrF90leklRIC0lTJ8V0L99yug53mHl8l9kVWfos0noA66oXZt8AlLR/h7PVovlDf 4yOl8McvdUFMw== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1nY3dl-00Co0g-6Q; Sat, 26 Mar 2022 11:27:25 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , "Hans de Goede" , "Stephen Rothwell" , linux-kernel@vger.kernel.org Subject: [PATCH v3 4/6] docs: kernel_include.py: add sphinx build dependencies Date: Sat, 26 Mar 2022 11:27:22 +0100 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The files included by kernel-include should be added as build dependencies, in order for sphinx-build to rebuild the corresponding docs if any changes at the included file happens. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C= /C on the cover. See [PATCH v3 0/6] at: https://lore.kernel.org/all/cover.1648290305.git.mch= ehab@kernel.org/ Documentation/sphinx/kernel_include.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/sphinx/kernel_include.py b/Documentation/sphinx/= kernel_include.py index f523aa68a36b..abe768088377 100755 --- a/Documentation/sphinx/kernel_include.py +++ b/Documentation/sphinx/kernel_include.py @@ -59,6 +59,7 @@ class KernelInclude(Include): u"""KernelInclude (``kernel-include``) directive""" =20 def run(self): + env =3D self.state.document.settings.env path =3D os.path.realpath( os.path.expandvars(self.arguments[0])) =20 @@ -70,6 +71,8 @@ class KernelInclude(Include): =20 self.arguments[0] =3D path =20 + env.note_dependency(os.path.abspath(path)) + #return super(KernelInclude, self).run() # won't work, see HINTs i= n _run() return self._run() =20 --=20 2.35.1 From nobody Mon Jun 22 08:23:24 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3949CC433F5 for ; Sat, 26 Mar 2022 10:27:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232114AbiCZK3d (ORCPT ); Sat, 26 Mar 2022 06:29:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232540AbiCZK3G (ORCPT ); Sat, 26 Mar 2022 06:29:06 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B27F55BD; Sat, 26 Mar 2022 03:27:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DEE7EB803F1; Sat, 26 Mar 2022 10:27:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79409C2BBE4; Sat, 26 Mar 2022 10:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648290447; bh=o9c+IInErQpOAwntbwHfaT1J5iPpxLk5tRtpR93Le08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l6UPQkpP18rB1ORZ3Pbg4YA9yl/Tp/GNYjzgOsyPhpBjSLe8EBIrpKC3QLxtQqDqO 7CKGLserdlk2jN3oD5b82gyqYjuR1UTrZ1xKoYyfv6cvdqRH4h+9LmXD1cavbg+/5J 5+//98a4m3gzjmrtgJO1w5yEMlPkRzy8PydbO1Pvv+NrTY2WdLfcHfHQ3wcES4EXu+ Zx+JPedWul3mTD+34SbzNYpHY+6I39DttErwQPQevAWGPNZQNLO2e93VELF1T+2bpy 7eaXNcWRmcUJh8f2GaqggbcFKGIxEqI0pxm9uW6tK+1O+Px0elJgZPzccMKyrWFDEX TXipT+Fgbk/Ow== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1nY3dl-00Co0k-87; Sat, 26 Mar 2022 11:27:25 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , "Hans de Goede" , "Stephen Rothwell" , Greg Kroah-Hartman , Randy Dunlap , linux-kernel@vger.kernel.org Subject: [PATCH v3 5/6] scripts/get_abi: change the file/line number meta info Date: Sat, 26 Mar 2022 11:27:23 +0100 Message-Id: <125ffd31fbc77ad9eee4d6906e1830b8162fa6ca.1648290305.git.mchehab@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" In order to make it more standard and ReST compatible, change the meta-tag used with --enable-lineno from: #define LINENO to .. LINENO In practice, no functional changes. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C= /C on the cover. See [PATCH v3 0/6] at: https://lore.kernel.org/all/cover.1648290305.git.mch= ehab@kernel.org/ Documentation/sphinx/kernel_abi.py | 2 +- scripts/get_abi.pl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kern= el_abi.py index efab9b14a9f5..b5feb5b1d905 100644 --- a/Documentation/sphinx/kernel_abi.py +++ b/Documentation/sphinx/kernel_abi.py @@ -138,7 +138,7 @@ class KernelCmd(Directive): code_block +=3D "\n " + l lines =3D code_block + "\n\n" =20 - line_regex =3D re.compile("^#define LINENO (\S+)\#([0-9]+)$") + line_regex =3D re.compile("^\.\. LINENO (\S+)\#([0-9]+)$") ln =3D 0 n =3D 0 f =3D fname diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl index 7437e19ba3ac..1389db76cff3 100755 --- a/scripts/get_abi.pl +++ b/scripts/get_abi.pl @@ -327,7 +327,7 @@ sub output_rest { my @filepath =3D split / /, $data{$what}->{filepath}; =20 if ($enable_lineno) { - printf "#define LINENO %s%s#%s\n\n", + printf ".. LINENO %s%s#%s\n\n", $prefix, $file[0], $data{$what}->{line_no}; } @@ -1023,7 +1023,7 @@ logic (B<--no-rst-source>). =20 =3Ditem B<--enable-lineno> =20 -Enable output of #define LINENO lines. +Enable output of .. LINENO lines. =20 =3Ditem B<--debug> I =20 --=20 2.35.1 From nobody Mon Jun 22 08:23:24 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54B3DC433EF for ; Sat, 26 Mar 2022 10:27:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232142AbiCZK3R (ORCPT ); Sat, 26 Mar 2022 06:29:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232523AbiCZK3E (ORCPT ); Sat, 26 Mar 2022 06:29:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5CED1C931; Sat, 26 Mar 2022 03:27:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3464160B70; Sat, 26 Mar 2022 10:27:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F31DC36AE3; Sat, 26 Mar 2022 10:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648290447; bh=D/w5PLTmwlSeMty7ZislHjJrVsonNmYqlWvibM6bjos=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oYE2WOtnWTlVl7RwQCOnNMIUwmKumKCvdrp23AY5azoXD44AJl73c+MNsPxviPKnP NXJTUizOR7BdDDgdFzVfUy29edVPStAypwloISfzgXHwbo9Z2kHurdbG7YuAtHhCqp mR5xijjlU+ohvBQ33K7z77ole7qNg9a++eL2Fl9b/h/KOXvqIRPRZLnHRfePuKND+w qczp0H7hmeWqOQvgCXfZ4acwXAB70MgOxVJhuxOuI9ii3bj4wW3EFGNkxaHyyQ8M7V KsLvYhdx+xA2VpAJqr9h4+59SlK0ESXPROcfXLiHmT3sQoWgLK87anBw5KJ0r59gfF MCIUFRXHmJ50A== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1nY3dl-00Co0o-9b; Sat, 26 Mar 2022 11:27:25 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , "Hans de Goede" , "Stephen Rothwell" , linux-kernel@vger.kernel.org Subject: [PATCH v3 6/6] scripts/kernel-doc: change the line number meta info Date: Sat, 26 Mar 2022 11:27:24 +0100 Message-Id: <40725032b5a4a33db740bf1de397523af958ff8a.1648290305.git.mchehab@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" In order to make it more standard and ReST compatible, change the meta-tag used with --enable-lineno from: #define LINENO to .. LINENO In practice, no functional changes. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C= /C on the cover. See [PATCH v3 0/6] at: https://lore.kernel.org/all/cover.1648290305.git.mch= ehab@kernel.org/ Documentation/sphinx/kerneldoc.py | 2 +- scripts/kernel-doc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerne= ldoc.py index 8189c33b9dda..9395892c7ba3 100644 --- a/Documentation/sphinx/kerneldoc.py +++ b/Documentation/sphinx/kerneldoc.py @@ -130,7 +130,7 @@ class KernelDocDirective(Directive): result =3D ViewList() =20 lineoffset =3D 0; - line_regex =3D re.compile("^#define LINENO ([0-9]+)$") + line_regex =3D re.compile("^\.\. LINENO ([0-9]+)$") for line in lines: match =3D line_regex.search(line) if match: diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 9c084a2ba3b0..7516949bb049 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -424,7 +424,7 @@ sub get_kernel_version() { sub print_lineno { my $lineno =3D shift; if ($enable_lineno && defined($lineno)) { - print "#define LINENO " . $lineno . "\n"; + print ".. LINENO " . $lineno . "\n"; } } ## @@ -2478,7 +2478,7 @@ May be specified multiple times. =20 =3Ditem -enable-lineno =20 -Enable output of #define LINENO lines. +Enable output of .. LINENO lines. =20 =3Dback =20 --=20 2.35.1