tools: ynl: make yarg the first member of struct ynl_dump_state
authorJakub Kicinski <kuba@kernel.org>
Tue, 27 Feb 2024 22:30:23 +0000 (14:30 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 28 Feb 2024 23:25:43 +0000 (15:25 -0800)
commitd62c5d487cfe41b2d47e790acc72a062308fb0f0
treebbc8c8e71ec9fe4bb1111accf8f8c5dc63cea703
parent7600875f295f4591eebbb3744ad5de3b4f8e4117
tools: ynl: make yarg the first member of struct ynl_dump_state

All YNL parsing code expects a pointer to struct ynl_parse_arg AKA yarg.
For dump was pass in struct ynl_dump_state, which works fine, because
struct ynl_dump_state and struct ynl_parse_arg have identical layout
for the members that matter.. but it's a bit hacky.

Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Link: https://lore.kernel.org/r/20240227223032.1835527-7-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/lib/ynl-priv.h
tools/net/ynl/lib/ynl.c
tools/net/ynl/ynl-gen-c.py