aboutsummaryrefslogtreecommitdiffstats
path: root/tools/net/ynl/pyynl/ynl_gen_c.py
diff options
context:
space:
mode:
authorJakub Kicinski <[email protected]>2025-07-23 17:10:42 +0000
committerJakub Kicinski <[email protected]>2025-07-25 00:28:49 +0000
commita8a9fd042e0995ed63d33f507c26baf56031e581 (patch)
treebe65ddfed0dc5c99b09e28c9a13e52c01daa8a8e /tools/net/ynl/pyynl/ynl_gen_c.py
parentMerge tag 'wireless-next-2025-07-24' of https://git.kernel.org/pub/scm/linux/... (diff)
downloadkernel-a8a9fd042e0995ed63d33f507c26baf56031e581.tar.gz
kernel-a8a9fd042e0995ed63d33f507c26baf56031e581.zip
tools: ynl-gen: don't add suffix for pure types
Don't add _req to helper names for pure types. We don't currently print those so it makes no difference to existing codegen. Reviewed-by: Donald Hunter <[email protected]> Acked-by: Stanislav Fomichev <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/net/ynl/pyynl/ynl_gen_c.py')
-rwxr-xr-xtools/net/ynl/pyynl/ynl_gen_c.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/net/ynl/pyynl/ynl_gen_c.py b/tools/net/ynl/pyynl/ynl_gen_c.py
index 76032e01c2e7..1bdcc368e776 100755
--- a/tools/net/ynl/pyynl/ynl_gen_c.py
+++ b/tools/net/ynl/pyynl/ynl_gen_c.py
@@ -1879,7 +1879,9 @@ def rdir(direction):
def op_prefix(ri, direction, deref=False):
suffix = f"_{ri.type_name}"
- if not ri.op_mode or ri.op_mode == 'do':
+ if not ri.op_mode:
+ pass
+ elif ri.op_mode == 'do':
suffix += f"{direction_to_suffix[direction]}"
else:
if direction == 'request':