diff mbox series

[26/34] docs: PCI: endpoint: pci-endpoint-cfs.rst: avoid using ReSt :doc:`foo` markup

Message ID 5268f6eb75bc0fe000f4884bca0a17f01eddbc40.1622898327.git.mchehab+huawei@kernel.org
State New
Headers show
Series docs: avoid using ReST :doc:`foo` tag | expand

Commit Message

Mauro Carvalho Chehab June 5, 2021, 1:18 p.m. UTC
The :doc:`foo` tag is auto-generated via automarkup.py.
So, use the filename at the sources, instead of :doc:`foo`.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 Documentation/PCI/endpoint/pci-endpoint-cfs.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bjorn Helgaas June 10, 2021, 11:46 p.m. UTC | #1
On Sat, Jun 05, 2021 at 03:18:25PM +0200, Mauro Carvalho Chehab wrote:
> The :doc:`foo` tag is auto-generated via automarkup.py.
> So, use the filename at the sources, instead of :doc:`foo`.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

It'd be nice to know why we're doing this and what the benefit is.

Maybe if you know more about ReSt, it's obvious that using :doc:`foo`
is wrong and produces the wrong output or something.  But I don't
know.

I do think the pathname in the new text is easier for plain-text
readers to follow.

(What's the correct spelling of "ReSt", BTW?  The cover letter has
"ReST", this patch has "ReSt", wikipedia says "RST, ReST, or reST".)

But anyway,

Acked-by: Bjorn Helgaas <bhelgaas@google.com>

> ---
>  Documentation/PCI/endpoint/pci-endpoint-cfs.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/PCI/endpoint/pci-endpoint-cfs.rst b/Documentation/PCI/endpoint/pci-endpoint-cfs.rst
> index 696f8eeb4738..db609b97ad58 100644
> --- a/Documentation/PCI/endpoint/pci-endpoint-cfs.rst
> +++ b/Documentation/PCI/endpoint/pci-endpoint-cfs.rst
> @@ -125,4 +125,4 @@ all the EPF devices are created and linked with the EPC device.
>  						| interrupt_pin
>  						| function
>  
> -[1] :doc:`pci-endpoint`
> +[1] Documentation/PCI/endpoint/pci-endpoint.rst
> -- 
> 2.31.1
>
Mauro Carvalho Chehab June 11, 2021, 8:45 a.m. UTC | #2
Em Thu, 10 Jun 2021 18:46:22 -0500
Bjorn Helgaas <helgaas@kernel.org> escreveu:

> On Sat, Jun 05, 2021 at 03:18:25PM +0200, Mauro Carvalho Chehab wrote:
> > The :doc:`foo` tag is auto-generated via automarkup.py.
> > So, use the filename at the sources, instead of :doc:`foo`.
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>  
> 
> It'd be nice to know why we're doing this and what the benefit is.

That came from an upstream discussion, mentioned on patch 00/34:

		https://lore.kernel.org/linux-doc/871r9k6rmy.fsf@meer.lwn.net/

Basically, using Documentation/.../foo.rst allows some text editors
to navigate directly to the file. Also, there's a preference from
some maintainers to keep the ReST files as close as possible to plain
text.

> Maybe if you know more about ReSt, it's obvious that using :doc:`foo`
> is wrong and produces the wrong output or something.  But I don't
> know.

It is more a matter of preference. That's said, there is indeed
an issue with the current builder: when using SPHINXDIRS="book",
doc:`foo` references may not work well. For instance, if one is
building just the driver-api book, a reference like :doc:`../admin-guide/foo`
can't be solved and will produce a warning, plus a bad output.

By using Documentation/admin-guide/foo.rst, it will simply be
displayed as a text without producing any harm.

We discussed in the past about that, but we didn't reach to any
conclusion about the proper way to fix it.

> I do think the pathname in the new text is easier for plain-text
> readers to follow.

Yes.

> 
> (What's the correct spelling of "ReSt", BTW?  The cover letter has
> "ReST", this patch has "ReSt", wikipedia says "RST, ReST, or reST".)

ReSt was a typo.. sorry for that. I guess the proper way is ReST,
but several places use RST instead. For instance, the conversion
tool pandoc uses "rst" to refer to this format.

> 
> But anyway,
> 
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>

Thanks!
Mauro

> 
> > ---
> >  Documentation/PCI/endpoint/pci-endpoint-cfs.rst | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/PCI/endpoint/pci-endpoint-cfs.rst b/Documentation/PCI/endpoint/pci-endpoint-cfs.rst
> > index 696f8eeb4738..db609b97ad58 100644
> > --- a/Documentation/PCI/endpoint/pci-endpoint-cfs.rst
> > +++ b/Documentation/PCI/endpoint/pci-endpoint-cfs.rst
> > @@ -125,4 +125,4 @@ all the EPF devices are created and linked with the EPC device.
> >  						| interrupt_pin
> >  						| function
> >  
> > -[1] :doc:`pci-endpoint`
> > +[1] Documentation/PCI/endpoint/pci-endpoint.rst
> > -- 
> > 2.31.1
> >   



Thanks,
Mauro
diff mbox series

Patch

diff --git a/Documentation/PCI/endpoint/pci-endpoint-cfs.rst b/Documentation/PCI/endpoint/pci-endpoint-cfs.rst
index 696f8eeb4738..db609b97ad58 100644
--- a/Documentation/PCI/endpoint/pci-endpoint-cfs.rst
+++ b/Documentation/PCI/endpoint/pci-endpoint-cfs.rst
@@ -125,4 +125,4 @@  all the EPF devices are created and linked with the EPC device.
 						| interrupt_pin
 						| function
 
-[1] :doc:`pci-endpoint`
+[1] Documentation/PCI/endpoint/pci-endpoint.rst