mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
tools: ynl-gen: move free printing to the print_type_full() helper
Just to avoid making the main function even more enormous, before adding more things to print move the free printing to a helper which already prints the type. Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20250723171046.4027470-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
a8a9fd042e
commit
cf58699777
|
|
@ -2546,6 +2546,10 @@ def print_type(ri, direction):
|
|||
def print_type_full(ri, struct):
|
||||
_print_type(ri, "", struct)
|
||||
|
||||
if struct.request and struct.in_multi_val:
|
||||
free_rsp_nested_prototype(ri)
|
||||
ri.cw.nl()
|
||||
|
||||
|
||||
def print_type_helpers(ri, direction, deref=False):
|
||||
print_free_prototype(ri, direction)
|
||||
|
|
@ -3517,9 +3521,6 @@ def main():
|
|||
for attr_set, struct in parsed.pure_nested_structs.items():
|
||||
ri = RenderInfo(cw, parsed, args.mode, "", "", attr_set)
|
||||
print_type_full(ri, struct)
|
||||
if struct.request and struct.in_multi_val:
|
||||
free_rsp_nested_prototype(ri)
|
||||
cw.nl()
|
||||
|
||||
for op_name, op in parsed.ops.items():
|
||||
cw.p(f"/* ============== {op.enum_name} ============== */")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user