All of lore.kernel.org
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Donald Hunter <donald.hunter@gmail.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Jiri Pirko <jiri@resnulli.us>,
	Alessandro Marcolini <alessandromarcolini99@gmail.com>,
	donald.hunter@redhat.com
Subject: Re: [PATCH net-next v1 2/3] doc: netlink: Add hyperlinks to generated Netlink docs
Date: Thu, 28 Mar 2024 16:38:56 -0700	[thread overview]
Message-ID: <ZgX/kJTKQP7GaR/b@gmail.com> (raw)
In-Reply-To: <CAD4GDZz+-3=fBqEkMJqORxF=1wwX84aXm3JW=K0tLG2vNF+Vdg@mail.gmail.com>

On Thu, Mar 28, 2024 at 03:54:09PM +0000, Donald Hunter wrote:

> > > -def rst_section(title: str) -> str:
> > > +def rst_section(prefix: str, title: str) -> str:
> > >      """Add a section to the document"""
> > > -    return f"\n{title}\n" + "=" * len(title)
> > > +    return f".. _{family}-{prefix}-{title}:\n\n{title}\n" + "=" * len(title)
> >
> > Where is 'family' variable set? Is this a global variable somewhere?
> 
> Yes, here in parse_yaml(). I realise it's a bit of a hack but would
> like to clean this up as part of switching to using ynl/lib/nlspec.py
> for reading the specs, in a separate patchset.

Thanks. Is it worth adding a hack that would be removed later, other
than going straight to the final solution?

> -    title = f"Family ``{obj['name']}`` netlink specification"
> +    # Save the family for use in ref labels
> +    global family

Is it hard to pass this variable by without having to use a global
variable?

  reply	other threads:[~2024-03-28 23:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 20:13 [PATCH net-next v1 0/3] doc: netlink: Add hyperlinks to generated docs Donald Hunter
2024-03-26 20:13 ` [PATCH net-next v1 1/3] doc: netlink: Change generated docs to limit TOC to depth 3 Donald Hunter
2024-03-28 15:03   ` Breno Leitao
2024-03-26 20:13 ` [PATCH net-next v1 2/3] doc: netlink: Add hyperlinks to generated Netlink docs Donald Hunter
2024-03-28 15:00   ` Breno Leitao
2024-03-28 15:54     ` Donald Hunter
2024-03-28 23:38       ` Breno Leitao [this message]
2024-03-29  1:38   ` Jakub Kicinski
2024-03-29 13:05     ` Donald Hunter
2024-03-26 20:13 ` [PATCH net-next v1 3/3] doc: netlink: Update tc spec with missing definitions 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=ZgX/kJTKQP7GaR/b@gmail.com \
    --to=leitao@debian.org \
    --cc=alessandromarcolini99@gmail.com \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=donald.hunter@redhat.com \
    --cc=edumazet@google.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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.