]> www.infradead.org Git - users/hch/misc.git/commitdiff
docs: kernel_include.py: remove range restriction for gen docs
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 22 Aug 2025 14:19:27 +0000 (16:19 +0200)
committerJonathan Corbet <corbet@lwn.net>
Fri, 29 Aug 2025 21:54:43 +0000 (15:54 -0600)
Originally, parse-readers were generating an output where
the first two lines were setting a literal block.

The script now gets only the actual parsed data without that,
so it is now safe to allow start-line and end-line parameters
to be handled.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/5dff693860a6a3faade15c24abdc380f09db468d.1755872208.git.mchehab+huawei@kernel.org
Documentation/sphinx/kernel_include.py

index c5f4f34e22cb44a2f34e96f7bb729eba7557756d..4cdd1c77982e6d60bc446f2407ab58d8a4b96b8d 100755 (executable)
@@ -122,9 +122,6 @@ class KernelInclude(Include):
             exceptions_file = os.path.join(source_dir, self.options['exception-file'])
             parser.process_exceptions(exceptions_file)
 
-        if self.options.get("start-line") or self.options.get("end-line"):
-            raise self.severe('generate-cross-refs can\'t be used with "start-line" or "end-line"')
-
         # Store references on a symbol dict to be used at check time
         if 'warn-broken' in self.options:
             env._xref_files.add(path)
@@ -209,9 +206,6 @@ class KernelInclude(Include):
 
             title = os.path.basename(path)
 
-            if startline or endline:
-                raise self.severe('generate-cross-refs can\'t be used together with "start-line" or "end-line"')
-
             if "code" not in self.options:
                 rawtext = ".. parsed-literal::\n\n" + rawtext
         else: