From: Federico Vaga <federico.vaga@vaga.pv.it>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH] doc: fix reference to core-api/namespaces.rst
Date: Sun, 24 Nov 2019 18:02:02 +0100 [thread overview]
Message-ID: <2008227.4siv4ILC15@harkonnen> (raw)
In-Reply-To: <20191122103437.59fda273@lwn.net>
On Friday, November 22, 2019 6:34:37 PM CET Jonathan Corbet wrote:
> On Fri, 22 Nov 2019 12:53:37 +0100
>
> Federico Vaga <federico.vaga@vaga.pv.it> wrote:
> > This patch:
> >
> > commit fcfacb9f8374 ("doc: move namespaces.rst from kbuild/ to core-api/")
> >
> > forgot to update the document kernel-hacking/hacking.rst.
> >
> > In addition to the fix the path now is a cross-reference to the document.
> >
> > Signed-off-by: Federico Vaga <federico.vaga@vaga.pv.it>
> > ---
> >
> > Documentation/core-api/symbol-namespaces.rst | 2 ++
> > Documentation/kernel-hacking/hacking.rst | 4 ++--
> > 2 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/core-api/symbol-namespaces.rst
> > b/Documentation/core-api/symbol-namespaces.rst index
> > 982ed7b568ac..6791f8a5d726 100644
> > --- a/Documentation/core-api/symbol-namespaces.rst
> > +++ b/Documentation/core-api/symbol-namespaces.rst
> > @@ -1,3 +1,5 @@
> > +.. _core-api-namespace:
> > +
>
> So I've been wondering for a bit why we don't use section headers as
> targets more often rather than adding all these tags. Perhaps it's because
> we never enabled that extension? What do you think of this as an
> alternative fix? (Probably before committing this I would split into two,
> since enabling the extension merits its own patch).
I take this occasion to express my opinion, even if it is not a strong
opinion, I am fine with your solution.
A tag should be always unique (a duplicated tag is an error), so a reference
to it can't (shouldn't) be wrong. A section header could be repeated when it
is, let's say, too generic (e.g. "Introduction" is a legitimate section in any
document). Then we can have both:
- a document title is, in general, unique so it is not a problem to use it as
targets
- a document sub-section could collide with others so it is preferable an
unique tag.
>
> Thanks,
>
> jon
>
> From b5ca7304e1a7f67717acff2a7bf50f56d387afdd Mon Sep 17 00:00:00 2001
> From: Jonathan Corbet <corbet@lwn.net>
> Date: Fri, 22 Nov 2019 10:30:30 -0700
> Subject: [PATCH] docs: fix reference to core-api/namespaces.rst
>
> Fix a couple of dangling links to core-api/namespaces.rst by turning them
> into proper references. Enable the autosection extension (available since
> Sphinx 1.4) to make this work.
>
> Co-developed-by: Federico Vaga <federico.vaga@vaga.pv.it>
> Fixes: fcfacb9f8374 ("doc: move namespaces.rst from kbuild/ to core-api/")
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
> ---
> Documentation/conf.py | 2 +-
> Documentation/kernel-hacking/hacking.rst | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/conf.py b/Documentation/conf.py
> index 3c7bdf4cd31f..fa2bfcd6df1d 100644
> --- a/Documentation/conf.py
> +++ b/Documentation/conf.py
> @@ -38,7 +38,7 @@ needs_sphinx = '1.3'
> # ones.
> extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'cdomain',
> 'kfigure', 'sphinx.ext.ifconfig', 'automarkup',
> - 'maintainers_include']
> + 'maintainers_include', 'sphinx.ext.autosectionlabel' ]
>
> # The name of the math extension changed on Sphinx 1.4
> if (major == 1 and minor > 3) or (major > 1):
> diff --git a/Documentation/kernel-hacking/hacking.rst
> b/Documentation/kernel-hacking/hacking.rst index a3ddb213a5e1..d707a0a61cc9
> 100644
> --- a/Documentation/kernel-hacking/hacking.rst
> +++ b/Documentation/kernel-hacking/hacking.rst
> @@ -601,7 +601,7 @@ Defined in ``include/linux/export.h``
>
> This is the variant of `EXPORT_SYMBOL()` that allows specifying a symbol
> namespace. Symbol Namespaces are documented in
> -``Documentation/kbuild/namespaces.rst``.
> +:ref:`Documentation/core-api/symbol-namespaces.rst <Symbol Namespaces>`
>
> :c:func:`EXPORT_SYMBOL_NS_GPL()`
>
> --------------------------------
> @@ -610,7 +610,7 @@ Defined in ``include/linux/export.h``
>
> This is the variant of `EXPORT_SYMBOL_GPL()` that allows specifying a
> symbol namespace. Symbol Namespaces are documented in
> -``Documentation/kbuild/namespaces.rst``.
> +:ref:`Documentation/core-api/symbol-namespaces.rst <Symbol Namespaces>`
>
> Routines and Conventions
> ========================
next prev parent reply other threads:[~2019-11-24 17:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-22 11:53 [PATCH] doc: fix reference to core-api/namespaces.rst Federico Vaga
2019-11-22 17:34 ` Jonathan Corbet
2019-11-24 17:02 ` Federico Vaga [this message]
2020-03-20 10:21 ` Mauro Carvalho Chehab
2020-03-20 11:12 ` [PATCH] docs: conf.py: avoid thousands of duplicate label warning on Sphinx Mauro Carvalho Chehab
2020-03-20 11:24 ` Federico Vaga
2020-03-20 11:59 ` Mauro Carvalho Chehab
2020-03-20 13:22 ` Mauro Carvalho Chehab
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=2008227.4siv4ILC15@harkonnen \
--to=federico.vaga@vaga.pv.it \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).