Re: [PATCH 1/2] doc:hacking: add labels

From: Jonathan Corbet
Date: Thu Jul 26 2018 - 18:20:08 EST


On Sat, 7 Jul 2018 00:05:16 +0200
Federico Vaga <federico.vaga@xxxxxxxxxx> wrote:

> Apparently some local links are not properly generated in locking.rst.
> This patch use the ':ref:' directive to add the link to the section label.
>
> Signed-off-by: Federico Vaga <federico.vaga@xxxxxxxxxx>
> ---
> Documentation/kernel-hacking/locking.rst | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/kernel-hacking/locking.rst b/Documentation/kernel-hacking/locking.rst
> index f937c0fd11aa..574fc92a6f20 100644
> --- a/Documentation/kernel-hacking/locking.rst
> +++ b/Documentation/kernel-hacking/locking.rst
> @@ -177,7 +177,7 @@ perfect world).
>
> Note that you can also use :c:func:`spin_lock_irq()` or
> :c:func:`spin_lock_irqsave()` here, which stop hardware interrupts
> -as well: see `Hard IRQ Context <#hardirq-context>`__.
> +as well: see :ref:`Hard IRQ Context <hardirq-context>`.

Actually, the real problem here was that the #tag was wrong. I've applied
the following instead.

Thanks,

jon

docs: Fix the reference labels in Locking.rst

Two jump tags were misspelled, leading to non-working cross-reference
links.

Reported-by: Federico Vaga <federico.vaga@xxxxxxxxxx>
Signed-off-by: Jonathan Corbet <corbet@xxxxxxx>
---
Documentation/kernel-hacking/locking.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/kernel-hacking/locking.rst b/Documentation/kernel-hacking/locking.rst
index f937c0fd11aa..9cc036ff57b9 100644
--- a/Documentation/kernel-hacking/locking.rst
+++ b/Documentation/kernel-hacking/locking.rst
@@ -177,7 +177,7 @@ perfect world).

Note that you can also use :c:func:`spin_lock_irq()` or
:c:func:`spin_lock_irqsave()` here, which stop hardware interrupts
-as well: see `Hard IRQ Context <#hardirq-context>`__.
+as well: see `Hard IRQ Context <#hard-irq-context>`__.

This works perfectly for UP as well: the spin lock vanishes, and this
macro simply becomes :c:func:`local_bh_disable()`
@@ -228,7 +228,7 @@ The Same Softirq
~~~~~~~~~~~~~~~~

The same softirq can run on the other CPUs: you can use a per-CPU array
-(see `Per-CPU Data <#per-cpu>`__) for better performance. If you're
+(see `Per-CPU Data <#per-cpu-data>`__) for better performance. If you're
going so far as to use a softirq, you probably care about scalable
performance enough to justify the extra complexity.

--
2.17.1