[PATCH 2/8] docs: kernel_{abi,feat}.py: use doc.current_source

From
Vegard Nossum <hidden>
Date
2024-02-05 17:52:00
Reply to
Vegard Nossum, 2024-02-05
It probably doesn't matter a whole lot what we actually pass here,
but the .rst being processed seems most appropriate to me.

This presumably gets used by Shpinx to record/report where each line
of .rst source originates.

Signed-off-by: Vegard Nossum <redacted>
---
 Documentation/sphinx/kernel_abi.py  | 2 +-
 Documentation/sphinx/kernel_feat.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py
index 5911bd0d7965..288f26097569 100644
--- a/Documentation/sphinx/kernel_abi.py
+++ b/Documentation/sphinx/kernel_abi.py
@@ -88,7 +88,7 @@ class KernelCmd(Directive):
             args.append('--rst-source')
 
         lines = subprocess.check_output(args, cwd=os.path.dirname(doc.current_source)).decode('utf-8')
-        nodeList = self.nestedParse(lines, self.arguments[0])
+        nodeList = self.nestedParse(lines, doc.current_source)
         return nodeList
 
     def nestedParse(self, lines, fname):
diff --git a/Documentation/sphinx/kernel_feat.py b/Documentation/sphinx/kernel_feat.py
index 03ace5f01b5c..3493621d1a4e 100644
--- a/Documentation/sphinx/kernel_feat.py
+++ b/Documentation/sphinx/kernel_feat.py
@@ -109,7 +109,7 @@ class KernelFeat(Directive):
             else:
                 out_lines += line + "\n"
 
-        nodeList = self.nestedParse(out_lines, self.arguments[0])
+        nodeList = self.nestedParse(out_lines, doc.current_source)
         return nodeList
 
     def nestedParse(self, lines, fname):
-- 
2.34.1
Thread (32 messages) 32 messages, 6 authors, last reply 2024-02-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help