mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 10:29:52 +00:00
docs: kdoc: Regularize the use of the declaration name
Each declaration type passes through the name in a unique field of the "args" blob - even though we have always just passed the name separately. Get rid of all the weird names and just use the common version. Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
@@ -790,7 +790,6 @@ class KernelDoc:
|
||||
level += 1
|
||||
|
||||
self.output_declaration(decl_type, declaration_name,
|
||||
struct=declaration_name,
|
||||
definition=declaration,
|
||||
purpose=self.entry.declaration_purpose)
|
||||
|
||||
@@ -870,7 +869,6 @@ class KernelDoc:
|
||||
f"Excess enum value '%{k}' description in '{declaration_name}'")
|
||||
|
||||
self.output_declaration('enum', declaration_name,
|
||||
enum=declaration_name,
|
||||
purpose=self.entry.declaration_purpose)
|
||||
|
||||
def dump_declaration(self, ln, prototype):
|
||||
@@ -1031,14 +1029,12 @@ class KernelDoc:
|
||||
|
||||
if 'typedef' in return_type:
|
||||
self.output_declaration(decl_type, declaration_name,
|
||||
function=declaration_name,
|
||||
typedef=True,
|
||||
functiontype=return_type,
|
||||
purpose=self.entry.declaration_purpose,
|
||||
func_macro=func_macro)
|
||||
else:
|
||||
self.output_declaration(decl_type, declaration_name,
|
||||
function=declaration_name,
|
||||
typedef=False,
|
||||
functiontype=return_type,
|
||||
purpose=self.entry.declaration_purpose,
|
||||
@@ -1077,7 +1073,6 @@ class KernelDoc:
|
||||
self.create_parameter_list(ln, decl_type, args, ',', declaration_name)
|
||||
|
||||
self.output_declaration(decl_type, declaration_name,
|
||||
function=declaration_name,
|
||||
typedef=True,
|
||||
functiontype=return_type,
|
||||
purpose=self.entry.declaration_purpose)
|
||||
@@ -1099,7 +1094,6 @@ class KernelDoc:
|
||||
return
|
||||
|
||||
self.output_declaration('typedef', declaration_name,
|
||||
typedef=declaration_name,
|
||||
purpose=self.entry.declaration_purpose)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user