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

Jakub Kicinski kuba at kernel.org
Tue Sep 16 01:42:28 UTC 2025


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 at kernel.org>


More information about the WireGuard mailing list