[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZbJpPuGP/GcZwhYZ@gmail.com>
Date: Thu, 25 Jan 2024 05:59:26 -0800
From: Breno Leitao <leitao@...ian.org>
To: Donald Hunter <donald.hunter@...il.com>
Cc: netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
Jacob Keller <jacob.e.keller@...el.com>,
Jiri Pirko <jiri@...nulli.us>,
Alessandro Marcolini <alessandromarcolini99@...il.com>,
donald.hunter@...hat.com
Subject: Re: [PATCH net-next v1 11/12] tools/net/ynl: Add type info to struct
members in generated docs
On Tue, Jan 23, 2024 at 04:05:37PM +0000, Donald Hunter wrote:
> Extend the ynl doc generator to include type information for struct
> members, ignoring the pad type.
>
> Signed-off-by: Donald Hunter <donald.hunter@...il.com>
> ---
> tools/net/ynl/ynl-gen-rst.py | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/tools/net/ynl/ynl-gen-rst.py b/tools/net/ynl/ynl-gen-rst.py
> index 262d88f88696..75c969d36b6a 100755
> --- a/tools/net/ynl/ynl-gen-rst.py
> +++ b/tools/net/ynl/ynl-gen-rst.py
> @@ -189,12 +189,20 @@ def parse_operations(operations: List[Dict[str, Any]]) -> str:
>
> def parse_entries(entries: List[Dict[str, Any]], level: int) -> str:
> """Parse a list of entries"""
> + ignored = ["pad"]
> lines = []
> for entry in entries:
> if isinstance(entry, dict):
> # entries could be a list or a dictionary
> + field_name = entry.get("name", "")
> + if field_name in ignored:
> + continue
> + type_ = entry.get("type")
> + struct_ = entry.get("struct")
Where are you using this `struct_` variable ?
Rest of the code it looks good.
Powered by blists - more mailing lists