Skip to content

Commit 5aabe52

Browse files
bagasmeKernel Patches Daemon
authored andcommitted
Documentation: checkpatch: Convert kernel docs references
checkpatch documentation has pointer references to various style-related docs. Convert them from external link to internal cross-references. For reference to docs sections, use section names and reference docs path as anchor text. Signed-off-by: Bagas Sanjaya <[email protected]>
1 parent 3c4989e commit 5aabe52

File tree

9 files changed

+113
-41
lines changed

9 files changed

+113
-41
lines changed

Documentation/dev-tools/checkpatch.rst

Lines changed: 80 additions & 41 deletions
Large diffs are not rendered by default.

Documentation/devicetree/bindings/submitting-patches.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Submitting Devicetree (DT) binding patches
55
==========================================
66

7+
.. _submitting-dt-patches:
8+
79
I. For patch submitters
810
=======================
911

Documentation/driver-api/driver-model/device.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ A driver can access the lock in the device structure using::
3535
void unlock_device(struct device * dev);
3636

3737

38+
.. _device-attributes:
39+
3840
Attributes
3941
~~~~~~~~~~
4042

Documentation/filesystems/sysfs.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ With the current sysfs implementation the kobject reference count is
5151
only modified directly by the function sysfs_schedule_callback().
5252

5353

54+
.. _sysfs-attributes:
55+
5456
Attributes
5557
~~~~~~~~~~
5658

Documentation/kbuild/reproducible-builds.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ The `Reproducible Builds project`_ has more information about this
1313
general topic. This document covers the various reasons why building
1414
the kernel may be unreproducible, and how to avoid them.
1515

16+
.. _kernel-timestamps:
17+
1618
Timestamps
1719
----------
1820

Documentation/locking/lockdep-design.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ Note: When changing code to use the _nested() primitives, be careful and
231231
check really thoroughly that the hierarchy is correctly mapped; otherwise
232232
you can get false positives or false negatives.
233233

234+
.. _lockdep-annotations:
235+
234236
Annotations
235237
-----------
236238

Documentation/process/coding-style.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ and NOT read it. Burn them, it's a great symbolic gesture.
1515
Anyway, here goes:
1616

1717

18+
.. _indentation-style:
19+
1820
1) Indentation
1921
--------------
2022

@@ -95,6 +97,8 @@ used for indentation, and the above example is deliberately broken.
9597
Get a decent editor and don't leave whitespace at the end of lines.
9698

9799

100+
.. _long-line-break:
101+
98102
2) Breaking long lines and strings
99103
----------------------------------
100104

@@ -117,6 +121,8 @@ However, never break user-visible strings such as printk messages because
117121
that breaks the ability to grep for them.
118122

119123

124+
.. _braces-placement:
125+
120126
3) Placing Braces and Spaces
121127
----------------------------
122128

@@ -231,6 +237,8 @@ Also, use braces when a loop contains more than a single simple statement:
231237
do_something();
232238
}
233239
240+
.. _spaces-usage:
241+
234242
3.1) Spaces
235243
***********
236244

@@ -303,6 +311,8 @@ of patches, this may make later patches in the series fail by changing their
303311
context lines.
304312

305313

314+
.. _naming-convention:
315+
306316
4) Naming
307317
---------
308318

@@ -594,6 +604,7 @@ fix for this is to split it up into two error labels ``err_free_bar:`` and
594604
595605
Ideally you should simulate errors to test all exit paths.
596606

607+
.. _comments-style:
597608

598609
8) Commenting
599610
-------------
@@ -792,6 +803,8 @@ Remember: if another thread can find your data structure, and you don't
792803
have a reference count on it, you almost certainly have a bug.
793804

794805

806+
.. _macros-style:
807+
795808
12) Macros, Enums and RTL
796809
-------------------------
797810

@@ -932,6 +945,8 @@ already inside a debug-related #ifdef section, printk(KERN_DEBUG ...) can be
932945
used.
933946

934947

948+
.. _memory-allocation-style:
949+
935950
14) Allocating memory
936951
---------------------
937952

Documentation/process/deprecated.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ a header file, it isn't the full solution. Such interfaces must either
2929
be fully removed from the kernel, or added to this file to discourage
3030
others from using them in the future.
3131

32+
.. _bug-macros-deprecated:
33+
3234
BUG() and BUG_ON()
3335
------------------
3436
Use WARN() and WARN_ON() instead, and handle the "impossible"
@@ -109,6 +111,8 @@ For more details, also see array3_size() and flex_array_size(),
109111
as well as the related check_mul_overflow(), check_add_overflow(),
110112
check_sub_overflow(), and check_shl_overflow() family of functions.
111113

114+
.. _simple-strtol-family-deprecated:
115+
112116
simple_strtol(), simple_strtoll(), simple_strtoul(), simple_strtoull()
113117
----------------------------------------------------------------------
114118
The simple_strtol(), simple_strtoll(),

Documentation/process/submitting-patches.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,8 @@ e-mail discussions.
393393
``git send-email`` will do this for you automatically.
394394

395395

396+
.. _dco-signoff:
397+
396398
Sign your work - the Developer's Certificate of Origin
397399
------------------------------------------------------
398400

@@ -406,6 +408,8 @@ patch, which certifies that you wrote it or otherwise have the right to
406408
pass it on as an open-source patch. The rules are pretty simple: if you
407409
can certify the below:
408410

411+
.. _dco-text:
412+
409413
Developer's Certificate of Origin 1.1
410414
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
411415

0 commit comments

Comments
 (0)