All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Donald Hunter <donald.hunter@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
	jacob.e.keller@intel.com, sdf@fomichev.me, jstancek@redhat.com
Subject: Re: [PATCH net-next 08/11] tools: ynl-gen: support weird sub-message formats
Date: Mon, 19 May 2025 20:07:10 -0700	[thread overview]
Message-ID: <20250519200710.714715d3@kernel.org> (raw)
In-Reply-To: <m2frh1j6jy.fsf@gmail.com>

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!

  reply	other threads:[~2025-05-20  3:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-17  0:13 [PATCH net-next 00/11] tools: ynl-gen: add support for "inherited" selector and therefore TC Jakub Kicinski
2025-05-17  0:13 ` [PATCH net-next 01/11] netlink: specs: tc: remove duplicate nests Jakub Kicinski
2025-05-18 13:34   ` Donald Hunter
2025-05-17  0:13 ` [PATCH net-next 02/11] netlink: specs: tc: use tc-gact instead of tc-gen as struct name Jakub Kicinski
2025-05-18 13:35   ` Donald Hunter
2025-05-17  0:13 ` [PATCH net-next 03/11] netlink: specs: tc: add C naming info Jakub Kicinski
2025-05-18 13:36   ` Donald Hunter
2025-05-17  0:13 ` [PATCH net-next 04/11] netlink: specs: tc: drop the family name prefix from attrs Jakub Kicinski
2025-05-18 13:37   ` Donald Hunter
2025-05-17  0:13 ` [PATCH net-next 05/11] tools: ynl-gen: support passing selector to a nest Jakub Kicinski
2025-05-18 13:46   ` Donald Hunter
2025-05-17  0:13 ` [PATCH net-next 06/11] tools: ynl-gen: move fixed header info from RenderInfo to Struct Jakub Kicinski
2025-05-18 13:49   ` Donald Hunter
2025-05-17  0:13 ` [PATCH net-next 07/11] tools: ynl-gen: support local attrs in _multi_parse Jakub Kicinski
2025-05-18 13:50   ` Donald Hunter
2025-05-17  0:13 ` [PATCH net-next 08/11] tools: ynl-gen: support weird sub-message formats Jakub Kicinski
2025-05-19  9:25   ` Donald Hunter
2025-05-20  3:07     ` Jakub Kicinski [this message]
2025-05-17  0:13 ` [PATCH net-next 09/11] tools: ynl: enable codegen for TC Jakub Kicinski
2025-05-19  9:26   ` Donald Hunter
2025-05-20  8:27   ` Kory Maincent
2025-05-17  0:13 ` [PATCH net-next 10/11] netlink: specs: tc: add qdisc dump to TC spec Jakub Kicinski
2025-05-19  9:27   ` Donald Hunter
2025-05-17  0:13 ` [PATCH net-next 11/11] tools: ynl: add a sample for TC Jakub Kicinski
2025-05-19 10:19   ` Donald Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250519200710.714715d3@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jstancek@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.