@@ -15,10 +15,10 @@ submitting code.  If you are submitting a driver, also read
1515Documentation/SubmittingDrivers; for device tree binding patches, read
1616Documentation/devicetree/bindings/submitting-patches.txt.
1717
18- Many of these steps describe the default behavior of the git version
19- control system; if you use git to prepare your patches, you'll find much
18+ Many of these steps describe the default behavior of the `` git``  version
19+ control system; if you use `` git``  to prepare your patches, you'll find much
2020of the mechanical work done for you, though you'll still need to prepare
21- and document a sensible set of patches.  In general, use of git will make
21+ and document a sensible set of patches.  In general, use of `` git``  will make
2222your life as a kernel developer easier.
2323
2424Creating and Sending your Change
@@ -29,7 +29,7 @@ Creating and Sending your Change
2929-------------------------------
3030
3131If you do not have a repository with the current kernel source handy, use
32- git to obtain one.  You'll want to start with the mainline repository,
32+ `` git``  to obtain one.  You'll want to start with the mainline repository,
3333which can be grabbed with::
3434
3535  git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
@@ -48,13 +48,14 @@ in the next section), but that is the hard way to do kernel development.
4848
4949If you must generate your patches by hand, use ``diff -up`` or ``diff -uprN``
5050to create patches.  Git generates patches in this form by default; if
51- you're using git, you can skip this section entirely.
51+ you're using `` git`` , you can skip this section entirely.
5252
5353All changes to the Linux kernel occur in the form of patches, as
54- generated by diff(1).  When creating your patch, make sure to create it
55- in "unified diff" format, as supplied by the ``-u`` argument to diff(1).
54+ generated by :manpage:`diff(1)`.  When creating your patch, make sure to
55+ create it in "unified diff" format, as supplied by the ``-u`` argument
56+ to :manpage:`diff(1)`.
5657Also, please use the ``-p`` argument which shows which C function each
57- change is in - that makes the resultant diff a lot easier to read.
58+ change is in - that makes the resultant `` diff``  a lot easier to read.
5859Patches should be based in the root kernel source directory,
5960not in any lower subdirectory.
6061
@@ -70,7 +71,7 @@ To create a patch for a single file, it is often sufficient to do::
7071	diff -up $SRCTREE/$MYFILE{.orig,} > /tmp/patch
7172
7273To create a patch for multiple files, you should unpack a "vanilla",
73- or unmodified kernel source tree, and generate a diff against your
74+ or unmodified kernel source tree, and generate a `` diff``  against your
7475own source tree.  For example::
7576
7677	MYSRC= /devel/linux
@@ -81,20 +82,20 @@ own source tree.  For example::
8182		linux-3.19-vanilla $MYSRC > /tmp/patch
8283
8384``dontdiff`` is a list of files which are generated by the kernel during
84- the build process, and should be ignored in any diff(1)-generated
85+ the build process, and should be ignored in any :manpage:` diff(1)` -generated
8586patch.
8687
8788Make sure your patch does not include any extra files which do not
8889belong in a patch submission.  Make sure to review your patch -after-
89- generating it with diff(1), to ensure accuracy.
90+ generating it with :manpage:` diff(1)` , to ensure accuracy.
9091
9192If your changes produce a lot of deltas, you need to split them into
9293individual patches which modify things in logical stages; see
9394:ref:`split_changes`.  This will facilitate review by other kernel developers,
9495very important if you want your patch accepted.
9596
96- If you're using git, ``git rebase -i`` can help you with this process.  If
97- you're not using git,  quilt <http://savannah.nongnu.org/projects/quilt>
97+ If you're using `` git`` , ``git rebase -i`` can help you with this process.  If
98+ you're not using `` git``, `` quilt``  <http://savannah.nongnu.org/projects/quilt>
9899is another popular alternative.
99100
100101.. _describe_changes:
@@ -133,7 +134,7 @@ as you intend it to.
133134
134135The maintainer will thank you if you write your patch description in a
135136form which can be easily pulled into Linux's source code management
136- system, git, as a "commit log".  See :ref:`explicit_in_reply_to`.
137+ system, `` git`` , as a "commit log".  See :ref:`explicit_in_reply_to`.
137138
138139Solve only one problem per patch.  If your description starts to get
139140long, that's a sign that you probably need to split up your patch.
@@ -156,7 +157,7 @@ its behaviour.
156157If the patch fixes a logged bug entry, refer to that bug entry by
157158number and URL.  If the patch follows from a mailing list discussion,
158159give a URL to the mailing list archive; use the https://lkml.kernel.org/
159- redirector with a Message-Id, to ensure that the links cannot become
160+ redirector with a `` Message-Id`` , to ensure that the links cannot become
160161stale.
161162
162163However, try to make your explanation understandable without external
@@ -181,13 +182,13 @@ there is no collision with your six-character ID now, that condition may
181182change five years from now.
182183
183184If your patch fixes a bug in a specific commit, e.g. you found an issue using
184- git- bisect, please use the 'Fixes:' tag with the first 12 characters of the 
185- SHA-1 ID, and the one line summary.  For example::
185+ `` git  bisect`` , please use the 'Fixes:' tag with the first 12 characters of
186+ the  SHA-1 ID, and the one line summary.  For example::
186187
187188	Fixes: e21d2170f366 ("video: remove unnecessary platform_set_drvdata()")
188189
189- The following git- config settings can be used to add a pretty format for
190- outputting the above style in the git log or git show commands::
190+ The following `` git  config``  settings can be used to add a pretty format for
191+ outputting the above style in the `` git log``  or `` git show``  commands::
191192
192193	[core]
193194		abbrev = 12
@@ -318,17 +319,17 @@ into the MAINTAINERS file for its current manager.
318319
319320Trivial patches must qualify for one of the following rules:
320321
321-  Spelling fixes in documentation
322-  Spelling fixes for errors which could break grep(1)
323-  Warning fixes (cluttering with useless warnings is bad)
324-  Compilation fixes (only if they are actually correct)
325-  Runtime fixes (only if they actually fix things)
326-  Removing use of deprecated functions/macros
327-  Contact detail and documentation fixes
328-  Non-portable code replaced by portable code (even in arch-specific,
329-  since people copy, as long as it's trivial)
330-  Any fix by the author/maintainer of the file (ie. patch monkey
331-  in re-transmission mode)
322+ -  Spelling fixes in documentation
323+ -  Spelling fixes for errors which could break :manpage:` grep(1)` 
324+ -  Warning fixes (cluttering with useless warnings is bad)
325+ -  Compilation fixes (only if they are actually correct)
326+ -  Runtime fixes (only if they actually fix things)
327+ -  Removing use of deprecated functions/macros
328+ -  Contact detail and documentation fixes
329+ -  Non-portable code replaced by portable code (even in arch-specific,
330+    since people copy, as long as it's trivial)
331+ -  Any fix by the author/maintainer of the file (ie. patch monkey
332+    in re-transmission mode)
332333
333334
334335
@@ -341,8 +342,11 @@ developer to be able to "quote" your changes, using standard e-mail
341342tools, so that they may comment on specific portions of your code.
342343
343344For this reason, all patches should be submitted by e-mail "inline".
344- WARNING:  Be wary of your editor's word-wrap corrupting your patch,
345- if you choose to cut-n-paste your patch.
345+ 
346+ .. warning::
347+ 
348+   Be wary of your editor's word-wrap corrupting your patch,
349+   if you choose to cut-n-paste your patch.
346350
347351Do not attach the patch as a MIME attachment, compressed or not.
348352Many popular e-mail applications will not always transmit a MIME
@@ -604,7 +608,7 @@ for more details.
604608------------------------------
605609
606610This section describes how the patch itself should be formatted.  Note
607- that, if you have your patches stored in a git repository, proper patch
611+ that, if you have your patches stored in a `` git``  repository, proper patch
608612formatting can be had with ``git format-patch``.  The tools cannot create
609613the necessary text, though, so read the instructions below anyway.
610614
@@ -629,7 +633,7 @@ The canonical patch message body contains the following:
629633
630634  - Any additional comments not suitable for the changelog.
631635
632-   - The actual patch (diff output).
636+   - The actual patch (`` diff``  output).
633637
634638The Subject line format makes it very easy to sort the emails
635639alphabetically by subject line - pretty much any email reader will
@@ -647,13 +651,13 @@ series`` is an ordered sequence of multiple, related patches).
647651
648652Bear in mind that the ``summary phrase`` of your email becomes a
649653globally-unique identifier for that patch.  It propagates all the way
650- into the git changelog.  The ``summary phrase`` may later be used in
654+ into the `` git``  changelog.  The ``summary phrase`` may later be used in
651655developer discussions which refer to the patch.  People will want to
652656google for the ``summary phrase`` to read discussion regarding that
653657patch.  It will also be the only thing that people may quickly see
654658when, two or three months later, they are going through perhaps
655- thousands of patches using tools such as ``gitk`` or " git log
656- --oneline" .
659+ thousands of patches using tools such as ``gitk`` or `` git log
660+ --oneline`` .
657661
658662For these reasons, the ``summary`` must be no more than 70-75
659663characters, and it must describe both what the patch changes, as well
@@ -704,18 +708,18 @@ The ``---`` marker line serves the essential purpose of marking for patch
704708handling tools where the changelog message ends.
705709
706710One good use for the additional comments after the ``---`` marker is for
707- a diffstat, to show what files have changed, and the number of
708- inserted and deleted lines per file.  A diffstat is especially useful
711+ a `` diffstat`` , to show what files have changed, and the number of
712+ inserted and deleted lines per file.  A `` diffstat``  is especially useful
709713on bigger patches.  Other comments relevant only to the moment or the
710714maintainer, not suitable for the permanent changelog, should also go
711715here.  A good example of such comments might be ``patch changelogs``
712716which describe what has changed between the v1 and v2 version of the
713717patch.
714718
715- If you are going to include a diffstat after the ``---`` marker, please
716- use diffstat options ``-p 1 -w 70`` so that filenames are listed from
719+ If you are going to include a `` diffstat``  after the ``---`` marker, please
720+ use `` diffstat``  options ``-p 1 -w 70`` so that filenames are listed from
717721the top of the kernel source tree and don't use too much horizontal
718- space (easily fit in 80 columns, maybe with some indentation).  (git
722+ space (easily fit in 80 columns, maybe with some indentation).  (`` git`` 
719723generates appropriate diffstats by default.)
720724
721725See more details on the proper patch format in the following
@@ -761,9 +765,9 @@ interest on a single line; it should look something like::
761765
762766A pull request should also include an overall message saying what will be
763767included in the request, a ``git shortlog`` listing of the patches
764- themselves, and a diffstat showing the overall effect of the patch series.
768+ themselves, and a `` diffstat``  showing the overall effect of the patch series.
765769The easiest way to get all this information together is, of course, to let
766- git do it for you with the ``git request-pull`` command.
770+ `` git``  do it for you with the ``git request-pull`` command.
767771
768772Some maintainers (including Linus) want to see pull requests from signed
769773commits; that increases their confidence that the request actually came
@@ -775,7 +779,7 @@ signed by one or more core kernel developers.  This step can be hard for
775779new developers, but there is no way around it.  Attending conferences can
776780be a good way to find developers who can sign your key.
777781
778- Once you have prepared a patch series in git that you wish to have somebody
782+ Once you have prepared a patch series in `` git``  that you wish to have somebody
779783pull, create a signed tag with ``git tag -s``.  This will create a new tag
780784identifying the last commit in the series and containing a signature
781785created with your private key.  You will also have the opportunity to add a
@@ -803,10 +807,15 @@ Jeff Garzik, "Linux kernel patch submission format".
803807
804808Greg Kroah-Hartman, "How to piss off a kernel subsystem maintainer".
805809  <http://www.kroah.com/log/linux/maintainer.html>
810+ 
806811  <http://www.kroah.com/log/linux/maintainer-02.html>
812+ 
807813  <http://www.kroah.com/log/linux/maintainer-03.html>
814+ 
808815  <http://www.kroah.com/log/linux/maintainer-04.html>
816+ 
809817  <http://www.kroah.com/log/linux/maintainer-05.html>
818+ 
810819  <http://www.kroah.com/log/linux/maintainer-06.html>
811820
812821NO!!!! No more huge patch bombs to 
[email protected]  people!
@@ -820,5 +829,6 @@ Linus Torvalds's mail on the canonical patch format:
820829
821830Andi Kleen, "On submitting kernel patches"
822831  Some strategies to get difficult or controversial changes in.
832+ 
823833  http://halobates.de/on-submitting-patches.pdf
824834
0 commit comments