]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
docs: kdoc_item: fix a typo on sections_start_lines
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 18 Mar 2026 09:11:08 +0000 (10:11 +0100)
committerJonathan Corbet <corbet@lwn.net>
Sun, 22 Mar 2026 21:10:40 +0000 (15:10 -0600)
Currently, there are 15 occurrences of section?_start_lines,
with 10 using the plural way.

This is an issue, as, while kdoc_output works with KdocItem,
the term doesn't match its init value.

The variable sections_start_lines stores multiple sections,
so placing it in plural is its correct way.

So, ensure that, on all parts of kdoc, this will be referred
as sections_start_lines.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <d1e0f1d3f80df41c11a1bbde6a12fd9468bc3813.1773823995.git.mchehab+huawei@kernel.org>

tools/lib/python/kdoc/kdoc_item.py
tools/lib/python/kdoc/kdoc_output.py
tools/lib/python/kdoc/kdoc_parser.py

index 5f41790efacb290ed5b6e5f8338feca15f1c8c17..fe08cac861c2924b5862a3a007d4bcf1ddfa337c 100644 (file)
@@ -82,7 +82,7 @@ class KdocItem:
         Set sections and start lines.
         """
         self.sections = sections
-        self.section_start_lines = start_lines
+        self.sections_start_lines = start_lines
 
     def set_params(self, names, descs, types, starts):
         """
index 73d71cbeabb5ce5145b838e3887f7b85867bb55d..1b54117dbe19cab6ff32b4f33238d4c9bf611ab2 100644 (file)
@@ -389,7 +389,7 @@ class RestFormat(OutputFormat):
             else:
                 self.data += f'{self.lineprefix}**{section}**\n\n'
 
-            self.print_lineno(args.section_start_lines.get(section, 0))
+            self.print_lineno(args.sections_start_lines.get(section, 0))
             self.output_highlight(text)
             self.data += "\n"
         self.data += "\n"
index f6c4ee3b18c9090811c311dd7585dfc228efecf5..35658a7e72d5014c233fd64bc2e5b8c2d517e0b3 100644 (file)
@@ -140,7 +140,7 @@ class KernelEntry:
         self.parametertypes = {}
         self.parameterdesc_start_lines = {}
 
-        self.section_start_lines = {}
+        self.sections_start_lines = {}
         self.sections = {}
 
         self.anon_struct_union = False
@@ -220,7 +220,7 @@ class KernelEntry:
                 self.sections[name] += '\n' + contents
             else:
                 self.sections[name] = contents
-                self.section_start_lines[name] = self.new_start_line
+                self.sections_start_lines[name] = self.new_start_line
                 self.new_start_line = 0
 
 #        self.config.log.debug("Section: %s : %s", name, pformat(vars(self)))
@@ -316,7 +316,7 @@ class KernelDoc:
         for section in ["Description", "Return"]:
             if section in sections and not sections[section].rstrip():
                 del sections[section]
-        item.set_sections(sections, self.entry.section_start_lines)
+        item.set_sections(sections, self.entry.sections_start_lines)
         item.set_params(self.entry.parameterlist, self.entry.parameterdescs,
                         self.entry.parametertypes,
                         self.entry.parameterdesc_start_lines)