[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250519200710.714715d3@kernel.org>
Date: Mon, 19 May 2025 20:07:10 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Donald Hunter <donald.hunter@...il.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
jacob.e.keller@...el.com, sdf@...ichev.me, jstancek@...hat.com
Subject: Re: [PATCH net-next 08/11] tools: ynl-gen: support weird
sub-message formats
On Mon, 19 May 2025 10:25:37 +0100 Donald Hunter wrote:
> > @@ -2234,8 +2260,9 @@ _C_KW = {
> >
> > ri.cw.block_start(line=f'{kw} (!strcmp(sel, "{name}"))')
> > get_lines, init_lines, _ = arg._attr_get(ri, var)
> > - for line in init_lines:
> > - ri.cw.p(line)
> > + if init_lines:
> > + for line in init_lines:
>
> I have a tiny preference for this construction, to eliminate the if
> statement. WDYT?
>
> for line in init_lines or []:
Sure thing, the if was annoying me, too
Will post v2 tomorrow morning, thanks for the reviews!
Powered by blists - more mailing lists