summaryrefslogtreecommitdiff
path: root/Documentation/sphinx/kernel_include.py
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2025-10-01 16:49:29 +0200
committerJonathan Corbet <corbet@lwn.net>2025-10-17 13:56:59 -0600
commit2cdd27a70887f8206809fae5c2c08c768fd8daba (patch)
tree7035fd04ce2c52d8ee87121b6b1b483d2e7ecb30 /Documentation/sphinx/kernel_include.py
parent9e4173432eecf7af9e6d8bf38fca537b55ed8538 (diff)
tools: docs: parse_data_structs.py: get rid of process_exceptions()
Add an extra parameter to parse_file to make it handle exceptions internally, cleaning up the API. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <8575bbc94ff706aa7e7cc3a188399ca17a3169e6.1759329363.git.mchehab+huawei@kernel.org>
Diffstat (limited to 'Documentation/sphinx/kernel_include.py')
-rwxr-xr-xDocumentation/sphinx/kernel_include.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Documentation/sphinx/kernel_include.py b/Documentation/sphinx/kernel_include.py
index e8f7e7a49758..895646da7495 100755
--- a/Documentation/sphinx/kernel_include.py
+++ b/Documentation/sphinx/kernel_include.py
@@ -214,14 +214,16 @@ class KernelInclude(Directive):
- a TOC table containing cross references.
"""
parser = ParseDataStructs()
- parser.parse_file(path)
if 'exception-file' in self.options:
source_dir = os.path.dirname(os.path.abspath(
self.state_machine.input_lines.source(
self.lineno - self.state_machine.input_offset - 1)))
exceptions_file = os.path.join(source_dir, self.options['exception-file'])
- parser.process_exceptions(exceptions_file)
+ else:
+ exceptions_file = None
+
+ parser.parse_file(path, exceptions_file)
# Store references on a symbol dict to be used at check time
if 'warn-broken' in self.options: