Re: [PATCH net-next v5 05/11] tools: ynl-gen: avoid repetitive variables definitions
Jakub Kicinski <[email protected]>
| Newsgroups | com.zx2c4.lists.wireguard,org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]>