Thread (28 messages) 28 messages, 3 authors, 2025-09-13

Re: [PATCH net-next v3 07/13] tools: ynl-gen: avoid repetitive variables definitions

From: Donald Hunter <donald.hunter@gmail.com>
Date: 2025-09-12 12:08:54
Also in: lkml

Asbjørn Sloth Tønnesen [off-list ref] writes:
In the generated attribute parsing code, avoid repetitively
defining the same variables over and over again, local to
the conditional block for each attribute.

This patch consolidates the definitions of local variables
for attribute parsing, so that they are defined at the
function level, and re-used across attributes, thus making
the generated code read more natural.

If attributes defines identical local_vars, then they will
be deduplicated, attributes are assumed to only use their
local variables transiently.

...

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Asbjørn Sloth Tønnesen <redacted>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help