mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 12:24:37 -04:00
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@fomichev.me> Link: https://patch.msgid.link/20241204155549.641348-3-sdf@fomichev.me Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
523d3cc4b6
commit
8c843ecde4
@@ -801,6 +801,7 @@ class EnumSet(SpecEnumSet):
|
||||
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)
|
||||
@@ -2441,6 +2442,9 @@ def render_uapi(family, cw):
|
||||
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('/**')
|
||||
|
||||
Reference in New Issue
Block a user