[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241115193646.1340825-3-sdf@fomichev.me>
Date: Fri, 15 Nov 2024 11:36:40 -0800
From: Stanislav Fomichev <sdf@...ichev.me>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org,
donald.hunter@...il.com,
horms@...nel.org,
corbet@....net,
andrew+netdev@...n.ch,
kory.maincent@...tlin.com,
sdf@...ichev.me
Subject: [PATCH net-next v2 2/8] ynl: skip rendering attributes with header property in uapi mode
To allow omitting some of the attributes in the final generated file.
Signed-off-by: Stanislav Fomichev <sdf@...ichev.me>
---
tools/net/ynl/ynl-gen-c.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/net/ynl/ynl-gen-c.py b/tools/net/ynl/ynl-gen-c.py
index 55e7f2415b0b..8ba252973c2d 100755
--- a/tools/net/ynl/ynl-gen-c.py
+++ b/tools/net/ynl/ynl-gen-c.py
@@ -801,6 +801,7 @@ from lib import SpecFamily, SpecAttrSet, SpecAttr, SpecOperation, SpecEnumSet, S
self.user_type = 'int'
self.value_pfx = yaml.get('name-prefix', f"{family.ident_name}-{yaml['name']}-")
+ self.header = yaml.get('header', None)
self.enum_cnt_name = yaml.get('enum-cnt-name', None)
super().__init__(family, yaml)
@@ -2440,6 +2441,9 @@ _C_KW = {
if const['type'] == 'enum' or const['type'] == 'flags':
enum = family.consts[const['name']]
+ if enum.header:
+ continue
+
if enum.has_doc():
if enum.has_entry_doc():
cw.p('/**')
--
2.47.0
Powered by blists - more mailing lists