mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
tools: ynl-gen: don't output external constants
A definition with a "header" property is an "external" definition for C code, as in it is defined already in another C header file. Other languages will need the exact value but C codegen should not recreate it. So don't output those definitions in the uAPI header. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Link: https://patch.msgid.link/20250203215510.1288728-1-kuba@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
5f9e5d20ee
commit
7e8b24e24a
|
|
@ -2549,6 +2549,9 @@ def render_uapi(family, cw):
|
|||
|
||||
defines = []
|
||||
for const in family['definitions']:
|
||||
if const.get('header'):
|
||||
continue
|
||||
|
||||
if const['type'] != 'const':
|
||||
cw.writes_defines(defines)
|
||||
defines = []
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user