Re: [PATCH 07/12] docs: accounting: update delay-accounting.rst reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em Wed, 2 Jun 2021 18:38:29 +0200
Peter Zijlstra <peterz@xxxxxxxxxxxxx> escreveu:

> On Wed, Jun 02, 2021 at 05:43:13PM +0200, Mauro Carvalho Chehab wrote:
> > When :doc: is used, the .rst should be removed. Also, the patches
> > are relative to the current directory.
> > 
> > So, the right reference should be:
> > 
> > 	:doc:`/accounting/delay-accounting`
> > 
> > Fixes: fcb501704554 ("delayacct: Document task_delayacct sysctl")
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
> > ---
> >  Documentation/admin-guide/sysctl/kernel.rst | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
> > index b2057173fe07..7f36cba3204b 100644
> > --- a/Documentation/admin-guide/sysctl/kernel.rst
> > +++ b/Documentation/admin-guide/sysctl/kernel.rst
> > @@ -1097,7 +1097,7 @@ task_delayacct
> >  ===============
> >  
> >  Enables/disables task delay accounting (see
> > -:doc:`accounting/delay-accounting.rst`). Enabling this feature incurs
> > +:doc:`/accounting/delay-accounting`). Enabling this feature incurs  
> 
> This breaks any chance of using 'goto file' like features in text
> editors :/ 

This is a feature of your favorite text editor. Not all have it.

> Can we please not do crap like this.

See, this is not the only place on this document using :doc:``. It is just
the one using it wrong:

	$ git grep :doc: Documentation/admin-guide/sysctl/kernel.rst
	Documentation/admin-guide/sysctl/kernel.rst:For general info and legal blurb, please look in :doc:`index`.
	Documentation/admin-guide/sysctl/kernel.rst:See :doc:`/power/video`. This allows the video resume mode to be set,
	Documentation/admin-guide/sysctl/kernel.rst::doc:`/x86/boot` for additional information.
	Documentation/admin-guide/sysctl/kernel.rst::doc:`/x86/boot` for additional information.
	Documentation/admin-guide/sysctl/kernel.rst:See :doc:`/driver-api/firmware/fallback-mechanisms`.
	Documentation/admin-guide/sysctl/kernel.rst:See :doc:`/trace/ftrace`.
	Documentation/admin-guide/sysctl/kernel.rst:See :doc:`/admin-guide/lockup-watchdogs` for more information.
	Documentation/admin-guide/sysctl/kernel.rst:to the guest kernel command line (see :doc:`/admin-guide/kernel-parameters`).
	Documentation/admin-guide/sysctl/kernel.rst:See :doc:`/admin-guide/initrd`.
	Documentation/admin-guide/sysctl/kernel.rst::doc:`accounting/delay-accounting.rst`). Enabling this feature incurs
	Documentation/admin-guide/sysctl/kernel.rst:See :doc:`/userspace-api/seccomp_filter`.
	Documentation/admin-guide/sysctl/kernel.rst:See :doc:`/admin-guide/sysrq`.
	Documentation/admin-guide/sysctl/kernel.rst:See :doc:`/admin-guide/tainted-kernels` for more information.
	Documentation/admin-guide/sysctl/kernel.rst:  See :doc:`/admin-guide/kernel-parameters` for more details on that particular
	Documentation/admin-guide/sysctl/kernel.rst:When set, disables tracing (see :doc:`/trace/ftrace`) when a
	Documentation/admin-guide/sysctl/kernel.rst:See :doc:`/admin-guide/kernel-parameters` and
	Documentation/admin-guide/sysctl/kernel.rst::doc:`/trace/boottime-trace`.

-

That's said, automarkup.py has a rule to convert Documentation/<foo>.rst
into :doc:`<foo>`. So, an alternative approach would be to convert
treewide all :doc:`<foo>` into Documentation/<foo>.rst and add something 
at checkpatch.pl to recommend to avoid :doc: notation.

Tests are needed, though, to be sure that automarkup.py won't miss
something, as the regex there might require tweaks to cover some
border cases.

Thanks,
Mauro



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux