]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
docs: kdoc_output: don't use a different modulename for functions
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 6 Mar 2026 15:45:44 +0000 (16:45 +0100)
committerJonathan Corbet <corbet@lwn.net>
Mon, 9 Mar 2026 16:34:38 +0000 (10:34 -0600)
It doesn't make much sense to have a different modulename just
for functions, but not for structs/enums/...

Use the same header everywere.

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

tools/lib/python/kdoc/kdoc_output.py

index 24ee1fad681eba1c4e858e56ec8ecc4f89453ad5..62e300e654058b11f44814ed5c5f11fc3dcf18cb 100644 (file)
@@ -607,14 +607,11 @@ class ManFormat(OutputFormat):
         "%m %d %Y",
     ]
 
-    def emit_th(self, name, modulename = None):
+    def emit_th(self, name):
         """Emit a title header line."""
         name = name.strip()
 
-        if not modulename:
-            modulename = self.modulename
-
-        self.data += f'.TH "{modulename}" {self.section} "{name}" '
+        self.data += f'.TH "{self.modulename}" {self.section} "{name}" '
         self.data += f'"{self.date}" "{self.manual}"\n'
 
     def __init__(self, modulename, section="9", manual="Kernel API Manual"):
@@ -748,7 +745,7 @@ class ManFormat(OutputFormat):
 
         out_name = self.arg_name(args, name)
 
-        self.emit_th(out_name, modulename = name)
+        self.emit_th(out_name)
 
         self.data += ".SH NAME\n"
         self.data += f"{name} \\- {args['purpose']}\n"