Thread (19 messages) 19 messages, 4 authors, 2025-09-16

Re: [PATCH net-next v5 05/11] tools: ynl-gen: avoid repetitive variables definitions

From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-09-16 01:42:29
Also in: lkml

On Mon, 15 Sep 2025 14:42:50 +0000 Asbjørn Sloth Tønnesen wrote:
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.
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help