Linux Documentation
 help / color / mirror / Atom feed
* [PATCH] docs: kdoc_parser: drop extraneous blank line in warning message
@ 2026-07-29  5:27 Randy Dunlap
  2026-08-03 18:17 ` Jonathan Corbet
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2026-07-29  5:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Jonathan Corbet, Shuah Khan, Mauro Carvalho Chehab,
	linux-doc

Drop an extra newline (blank line) on warning messages for (2 places):
  expecting prototype for typedef. Prototype was for typedef {symbol}
    instead
and
  expecting prototype for {struct|union}. Prototype was for struct|union
    {symbol} instead

This makes these messages consistent with the similar enum warning,
which has no extra blank line.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-doc@vger.kernel.org

 tools/lib/python/kdoc/kdoc_parser.py |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- linux-next-20260727.orig/tools/lib/python/kdoc/kdoc_parser.py
+++ linux-next-20260727/tools/lib/python/kdoc/kdoc_parser.py
@@ -838,7 +838,7 @@ class KernelDoc:
 
         if self.entry.identifier != declaration_name:
             self.emit_msg(ln, f"expecting prototype for {decl_type} {self.entry.identifier}. "
-                          f"Prototype was for {decl_type} {declaration_name} instead\n")
+                          f"Prototype was for {decl_type} {declaration_name} instead")
             return
         #
         # Go through the list of members applying all of our transformations.
@@ -1155,7 +1155,7 @@ class KernelDoc:
 
             if self.entry.identifier != declaration_name:
                 self.emit_msg(ln,
-                              f"expecting prototype for typedef {self.entry.identifier}. Prototype was for typedef {declaration_name} instead\n")
+                              f"expecting prototype for typedef {self.entry.identifier}. Prototype was for typedef {declaration_name} instead")
                 return
 
             self.create_parameter_list(ln, 'function', args, ',', declaration_name)
@@ -1175,7 +1175,7 @@ class KernelDoc:
 
             if self.entry.identifier != declaration_name:
                 self.emit_msg(ln,
-                              f"expecting prototype for typedef {self.entry.identifier}. Prototype was for typedef {declaration_name} instead\n")
+                              f"expecting prototype for typedef {self.entry.identifier}. Prototype was for typedef {declaration_name} instead")
                 return
 
             self.output_declaration('typedef', declaration_name,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-03 18:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29  5:27 [PATCH] docs: kdoc_parser: drop extraneous blank line in warning message Randy Dunlap
2026-08-03 18:17 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox