Improve documentation for the development-process
Subsystems (2)
cover Improve documentation for the development-process
This patch series is a followup to be applied after the:
[PATCH v3 00/21] Create a book for Kernel development
patch series.
It addresses some issues I noticed after re-reading the html docs after the conversion of those files to ReST.
It also converts two extra documents to ReST:
Documentation/SubmitChecklist
Documentation/email-clients.txt
Both are mentioned on the previous document, and are part of the patch submission process. So, it makes sense to group them at the development-process book.
I also took the time to update the applying-patches.rst, as I found some outdated information there.
Regards,
Mauro
Mauro Carvalho Chehab (17):
HOWTO.rst: update information about generating documentation HOWTO.rst: improve some markups to make it visually better HOWTO.rst: adjust external link references
Changes.rst: add minimal requirements for documentation build
SubmitChecklist: update kernel-doc task
SubmitChecklist: convert it to ReST markup
SubmitChecklist: rename to RST and add to the development-proccess
book
doc-rst: add CSS styles for :kbd: and :menuselection:
email-clients.txt: convert it to ReST markup email-clients.txt: add it to the development-process book SubmittingPatches.rst: Add some cross-references SubmittingPatches.rst: enrich the Sphinx output SubmittingDrivers.rst: add a cross reference to CodingStyle stable_api_nonsense.rst: fix emphasis on Sphinx ManagementStyle.rst: avoid emphasis where not desired stable_kernel_rules.rst: Add cross-references to other ReST files applying-patches.rst: Update the information there
Documentation/SubmitChecklist | 109 ---------
Documentation/development-process/5.Posting.rst | 2 +-
Documentation/development-process/Changes.rst | 36 ++-
Documentation/development-process/HOWTO.rst | 101 ++++----
.../development-process/ManagementStyle.rst | 2 +
.../development-process/SubmitChecklist.rst | 120 ++++++++++
.../development-process/SubmittingDrivers.rst | 7 +-
.../development-process/SubmittingPatches.rst | 124 +++++-----
.../development-process/applying-patches.rst | 255 +++++++++------------
.../development-process/development-process.rst | 2 +
.../email-clients.rst} | 216 +++++++++--------
Documentation/development-process/index.rst | 2 +
.../development-process/stable_api_nonsense.rst | 2 +-
.../development-process/stable_kernel_rules.rst | 7 +-
Documentation/hwmon/submitting-patches | 2 +-
Documentation/ja_JP/SubmitChecklist | 4 +-
Documentation/ja_JP/SubmittingPatches | 4 +-
Documentation/kernel-documentation.rst | 2 +
Documentation/sphinx-static/theme_overrides.css | 15 +-
Documentation/zh_CN/SubmittingPatches | 2 +-
Documentation/zh_CN/email-clients.txt | 4 +-
21 files changed, 555 insertions(+), 463 deletions(-)
delete mode 100644 Documentation/SubmitChecklist
create mode 100644 Documentation/development-process/SubmitChecklist.rst
rename Documentation/{email-clients.txt => development-process/email-clients.rst} (56%)Signature · 1 line
2.7.4
PATCH 1/17 HOWTO.rst: update information about generating documentation
The description there are pre-Sphinx. Update it to cover the new way.
--- Documentation/development-process/HOWTO.rst | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-)
Documentation/development-process/HOWTO.rst +22 -6
@@ -164,21 +164,37 @@ required reading: apply it to the different development branches of the kernel. The kernel also has a large number of documents that can be -automatically generated from the source code itself. This includes a +automatically generated from the source code itself or from +ReStructuredText markups (ReST), like this one. This includes a full description of the in-kernel API, and rules on how to handle -locking properly. The documents will be created in the -Documentation/DocBook/ directory and can be generated as PDF, -Postscript, HTML, and man pages by running: +locking properly. + +All such documents can be generated as PDF or HTML by running: :: make pdfdocs - make psdocs make htmldocs - make mandocs respectively from the main kernel source directory. +The documents that uses ReST markup will be generated at Documentation/output. +They can also be generated on LaTeX and ePub formats with: + +:: + + make latexdocs + make epubdocs + +Currently, there are some documents written on DocBook that are in +the process of conversion to ReST. Such documents will be created in the +Documentation/DocBook/ directory and can be generated also as +Postscript or man pages by running: + +:: + + make psdocs + make mandocs Becoming A Kernel Developer ---------------------------
Signature · 1 line
2.7.4
PATCH 2/17 HOWTO.rst: improve some markups to make it visually better
In reply to Mauro Carvalho ChehabDo a series of minor improvements at the ReST output format:
- Instead of using the quote blocks (::) for quotes, use italics. That looks nicer on epub (and html) output, as no scroll bar will be added. Also, it will adjust line breaks on the text automatically.
- Add a missing reference to SubmittingPatches.rst and use **foo** instead of _foo_.
- use bold for "The Perfect Patch" by removing a newline.
--- Documentation/development-process/HOWTO.rst | 36 +++++++++++++---------------- 1 file changed, 16 insertions(+), 20 deletions(-)
Documentation/development-process/HOWTO.rst +16 -20
@@ -292,11 +292,9 @@ process is as follows: It is worth mentioning what Andrew Morton wrote on the linux-kernel mailing list about kernel releases: -:: - - "Nobody knows when a kernel will be released, because it's + *"Nobody knows when a kernel will be released, because it's released according to perceived bug status, not according to a - preconceived timeline." + preconceived timeline."* 4.x.y -stable kernel tree -------------------------
@@ -449,13 +447,14 @@ add your statements between the individual quoted sections instead of writing at the top of the mail. If you add patches to your mail, make sure they are plain readable text -as stated in Documentation/development-process/SubmittingPatches.rst. Kernel developers don't -want to deal with attachments or compressed patches; they may want -to comment on individual lines of your patch, which works only that way. -Make sure you use a mail program that does not mangle spaces and tab -characters. A good first test is to send the mail to yourself and try -to apply your own patch by yourself. If that doesn't work, get your -mail program fixed or change it until it works. +as stated in :ref:`Documentation/development-process/SubmittingPatches.rst +<submittingpatches>`. Kernel developers don't want to deal with +attachments or compressed patches; they may want to comment on +individual lines of your patch, which works only that way. Make sure you +use a mail program that does not mangle spaces and tab characters. A +good first test is to send the mail to yourself and try to apply your +own patch by yourself. If that doesn't work, get your mail program fixed +or change it until it works. Above all, please remember to show respect to other subscribers.
@@ -496,8 +495,8 @@ Remember, being wrong is acceptable as long as you are willing to work toward a solution that is right. It is normal that the answers to your first patch might simply be a list -of a dozen things you should correct. This does _not_ imply that your -patch will not be accepted, and it is _not_ meant against you +of a dozen things you should correct. This does **not** imply that your +patch will not be accepted, and it is **not** meant against you personally. Simply correct all issues raised against your patch and resend it.
@@ -582,19 +581,17 @@ The reasons for breaking things up are the following: Here is an analogy from kernel developer Al Viro: -:: - - "Think of a teacher grading homework from a math student. The + *"Think of a teacher grading homework from a math student. The teacher does not want to see the student's trials and errors before they came up with the solution. They want to see the cleanest, most elegant answer. A good student knows this, and would never submit her intermediate work before the final - solution. + solution.* - The same is true of kernel development. The maintainers and + *The same is true of kernel development. The maintainers and reviewers do not want to see the thought process behind the solution to the problem one is solving. They want to see a - simple and elegant solution." + simple and elegant solution."* It may be challenging to keep the balance between presenting an elegant solution and working together with the community and discussing your
@@ -632,7 +629,6 @@ For more details on what this should all look like, please see the ChangeLog section of the document: "The Perfect Patch" - http://www.ozlabs.org/~akpm/stuff/tpp.txt
Signature · 1 line
2.7.4
PATCH 3/17 HOWTO.rst: adjust external link references
In reply to Mauro Carvalho Chehab- A few link references were missing http://
- Several sites are now redirecting to https protocol. On such cases, just use the https URL.
NOTE: all URLs were checked and they're pointing to the right places.
--- Documentation/development-process/HOWTO.rst | 37 +++++++++++++---------------- 1 file changed, 17 insertions(+), 20 deletions(-)
Documentation/development-process/HOWTO.rst +17 -20
@@ -66,7 +66,7 @@ their statements on legal matters. For common questions and answers about the GPL, please see: - http://www.gnu.org/licenses/gpl-faq.html + https://www.gnu.org/licenses/gpl-faq.html Documentation
@@ -117,11 +117,9 @@ required reading: Other excellent descriptions of how to create patches properly are: "The Perfect Patch" - - http://www.ozlabs.org/~akpm/stuff/tpp.txt + https://www.ozlabs.org/~akpm/stuff/tpp.txt "Linux kernel patch submission format" - http://linux.yyz.us/patch-format.html :ref:`Documentation/development-process/stable_api_nonsense.rst <stable_api_nonsense>`
@@ -202,7 +200,7 @@ Becoming A Kernel Developer If you do not know anything about Linux kernel development, you should look at the Linux KernelNewbies project: - http://kernelnewbies.org + https://kernelnewbies.org It consists of a helpful mailing list where you can ask almost any type of basic kernel development question (make sure to search the archives
@@ -220,7 +218,7 @@ If you do not know where you want to start, but you want to look for some task to start doing to join into the kernel development community, go to the Linux Kernel Janitor's project: - http://kernelnewbies.org/KernelJanitors + https://kernelnewbies.org/KernelJanitors It is a great place to start. It describes a list of relatively simple problems that need to be cleaned up and fixed within the Linux kernel
@@ -234,7 +232,7 @@ tree, but need some help getting it in the proper form, the kernel-mentors project was created to help you out with this. It is a mailing list, and can be found at: - http://selenic.com/mailman/listinfo/kernel-mentors + https://selenic.com/mailman/listinfo/kernel-mentors Before making any actual modifications to the Linux kernel code, it is imperative to understand how the code in question works. For this
@@ -264,7 +262,7 @@ branches. These different branches are: 4.x kernel tree ----------------- 4.x kernels are maintained by Linus Torvalds, and can be found on -kernel.org in the pub/linux/kernel/v4.x/ directory. Its development +https://kernel.org in the pub/linux/kernel/v4.x/ directory. Its development process is as follows: - As soon as a new kernel is released a two weeks window is open,
@@ -272,7 +270,7 @@ process is as follows: Linus, usually the patches that have already been included in the -next kernel for a few weeks. The preferred way to submit big changes is using git (the kernel's source management tool, more information - can be found at http://git-scm.com/) but plain patches are also just + can be found at https://git-scm.com/) but plain patches are also just fine. - After two weeks a -rc1 kernel is released it is now possible to push only patches that do not include new features that could affect the
@@ -340,7 +338,7 @@ submission and other already ongoing work are avoided. Most of these repositories are git trees, but there are also other SCMs in use, or patch queues being published as quilt series. Addresses of these subsystem repositories are listed in the MAINTAINERS file. Many -of them can be browsed at http://git.kernel.org/. +of them can be browsed at https://git.kernel.org/. Before a proposed patch is committed to such a subsystem tree, it is subject to review which primarily happens on mailing lists (see the
@@ -349,7 +347,7 @@ process is tracked with the tool patchwork. Patchwork offers a web interface which shows patch postings, any comments on a patch or revisions to it, and maintainers can mark patches as under review, accepted, or rejected. Most of these patchwork sites are listed at -http://patchwork.kernel.org/. +https://patchwork.kernel.org/. 4.x -next kernel tree for integration tests -------------------------------------------
@@ -358,7 +356,7 @@ tree, they need to be integration-tested. For this purpose, a special testing repository exists into which virtually all subsystem trees are pulled on an almost daily basis: - http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git + https://git.kernel.org/?p=linux/kernel/git/next/linux-next.git This way, the -next kernel gives a summary outlook onto what will be expected to go into the mainline kernel at the next merge period.
@@ -368,11 +366,11 @@ Adventurous testers are very welcome to runtime-test the -next kernel. Bug Reporting ------------- -bugzilla.kernel.org is where the Linux kernel developers track kernel +https://bugzilla.kernel.org is where the Linux kernel developers track kernel bugs. Users are encouraged to report all bugs that they find in this tool. For details on how to use the kernel bugzilla, please see: - http://bugzilla.kernel.org/page.cgi?id=faq.html + https://bugzilla.kernel.org/page.cgi?id=faq.html The file REPORTING-BUGS in the main kernel source directory has a good template for how to report a possible kernel bug, and details what kind
@@ -390,13 +388,14 @@ your skills, and other developers will be aware of your presence. Fixing bugs is one of the best ways to get merits among other developers, because not many people like wasting time fixing other people's bugs. -To work in the already reported bug reports, go to http://bugzilla.kernel.org. +To work in the already reported bug reports, go to https://bugzilla.kernel.org. If you want to be advised of the future bug reports, you can subscribe to the bugme-new mailing list (only new bug reports are mailed here) or to the bugme-janitor mailing list (every change in the bugzilla is mailed here) - http://lists.linux-foundation.org/mailman/listinfo/bugme-new - http://lists.linux-foundation.org/mailman/listinfo/bugme-janitors + https://lists.linux-foundation.org/mailman/listinfo/bugme-new + + https://lists.linux-foundation.org/mailman/listinfo/bugme-janitors
@@ -632,8 +631,6 @@ ChangeLog section of the document: http://www.ozlabs.org/~akpm/stuff/tpp.txt - - All of these things are sometimes very hard to do. It can take years to perfect these practices (if at all). It's a continuous process of improvement that requires a lot of patience and determination. But
@@ -646,7 +643,7 @@ start exactly where you are now. ---------- Thanks to Paolo Ciarrocchi who allowed the "Development Process" -(http://lwn.net/Articles/94386/) section +(https://lwn.net/Articles/94386/) section to be based on text he had written, and to Randy Dunlap and Gerrit Huizenga for some of the list of things you should and should not say. Also thanks to Pat Mochel, Hanna Linder, Randy Dunlap, Kay Sievers,
Signature · 1 line
2.7.4
PATCH 4/17 Changes.rst: add minimal requirements for documentation build
In reply to Mauro Carvalho ChehabAs discussed at linux-doc ML, the best is to keep all documents backward compatible with Sphinx version 1.2, as it is the latest version found on some distros like Debian.
All books currently support it.
Please notice that, while it mentions the eventual need of XeLaTex and texlive to build pdf files, this is not a minimal requirement, as one could just be interested on building html documents. Also, identifying the minimal requirements for texlive packages is not trivial, as each distribution seems to use different criteria on grouping LaTex functionalities.
While here, update the current kernel version to 4.x.
--- Documentation/development-process/Changes.rst | 36 ++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-)
Documentation/development-process/Changes.rst +35 -1
@@ -7,7 +7,7 @@ Intro ===== This document is designed to provide a list of the minimum levels of -software necessary to run the 3.0 kernels. +software necessary to run the 4.x kernels. This document is originally based on my "Changes" file for 2.0.x kernels and therefore owes credit to the same people as that file (Jared Mauch,
@@ -53,8 +53,10 @@ mcelog 0.6 mcelog --version iptables 1.4.2 iptables -V openssl & libcrypto 1.0.0 openssl version bc 1.06.95 bc --version +Sphinx\ [#f1]_ 1.2 sphinx-build --version ====================== =============== ======================================== +.. [#f1] Sphinx is needed only to build the Kernel documentation Kernel compilation ******************
@@ -309,6 +311,30 @@ On x86 kernels the mcelog utility is needed to process and log machine check events when ``CONFIG_X86_MCE`` is enabled. Machine check events are errors reported by the CPU. Processing them is strongly encouraged. +Kernel documentation +******************** + +Sphinx +------ + +The ReST markups currently used by the Documentation/ files are meant to be +built with ``Sphinx`` version 1.2 or upper. If you're desiring to build +PDF outputs, it is recommended to use version 1.4.6. + +.. note:: + + Please notice that, for PDF and LaTeX output, you'll also need ``XeLaTeX`` + version 3.14159265. Depending on the distribution, you may also need + to install a series of ``texlive`` packages that provide the minimal + set of functionalities required for ``XeLaTex`` to work. + +Other tools +----------- + +In order to produce documentation from DocBook, you'll also need ``xmlto``. +Please notice, however, that we're currently migrating all documents to use +``Sphinx``. + Getting updated software ========================
@@ -455,3 +481,11 @@ NFS-Utils --------- - <http://nfs.sourceforge.net/> + +Kernel documentation +******************** + +Sphinx +------ + +- <http://www.sphinx-doc.org/>
Signature · 1 line
2.7.4
PATCH 5/17 SubmitChecklist: update kernel-doc task
In reply to Mauro Carvalho ChehabTask 11 (kernel-doc) still mentions usage of make manpages, but this won't work if the API is documented via Sphinx. So, update it to use either htmldocs or pdfdocs, with are the documentation targets that work for all.
While here, add ReST reference to the kernel documentation book.
--- Documentation/SubmitChecklist | 7 ++++--- Documentation/kernel-documentation.rst | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-)
Documentation/SubmitChecklist +4 -3
@@ -47,9 +47,10 @@ kernel patches. but any one function that uses more than 512 bytes on the stack is a candidate for change. -11: Include kernel-doc to document global kernel APIs. (Not required for - static functions, but OK there also.) Use 'make htmldocs' or 'make - mandocs' to check the kernel-doc and fix any issues. +11: Include :ref:`kernel-doc <kernel_doc>` to document global kernel APIs. + (Not required for static functions, but OK there also.) Use + ``make htmldocs`` or ``make pdfdocs`` to check the + :ref:`kernel-doc <kernel_doc>` and fix any issues. 12: Has been tested with CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES,
Documentation/kernel-documentation.rst +2 -0
@@ -294,6 +294,8 @@ The kernel-doc extension is included in the kernel source tree, at ``scripts/kernel-doc`` script to extract the documentation comments from the source. +.. _kernel_doc: + Writing kernel-doc comments ===========================
Signature · 1 line
2.7.4
PATCH 6/17 SubmitChecklist: convert it to ReST markup
In reply to Mauro Carvalho Chehab- use ``foo`` to markup inline literal stuff, effectively making it to be presented as a monospaced font when parsed by Sphinx;
- the markup below the title should have the same length as the title;
- Fix the list markups, from "1:" to "1)";
- Split item 2 into a separate list for the build options, in order to be presented as a list on Sphinx;
--- Documentation/SubmitChecklist | 118 ++++++++++++++++++++++-------------------- 1 file changed, 63 insertions(+), 55 deletions(-)
Documentation/SubmitChecklist +63 -55
@@ -1,110 +1,118 @@ Linux Kernel patch submission checklist -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are some basic things that developers should do if they want to see their kernel patch submissions accepted more quickly. These are all above and beyond the documentation that is provided in -Documentation/development-process/SubmittingPatches.rst and elsewhere regarding submitting Linux -kernel patches. +:ref:`Documentation/development-process/SubmittingPatches.rst <submittingpatches>` +and elsewhere regarding submitting Linux kernel patches. -1: If you use a facility then #include the file that defines/declares +1) If you use a facility then #include the file that defines/declares that facility. Don't depend on other header files pulling in ones that you use. -2: Builds cleanly with applicable or modified CONFIG options =y, =m, and - =n. No gcc warnings/errors, no linker warnings/errors. +2) Builds cleanly: -2b: Passes allnoconfig, allmodconfig + a) with applicable or modified ``CONFIG`` options ``=y``, ``=m``, and + ``=n``. No ``gcc`` warnings/errors, no linker warnings/errors. -2c: Builds successfully when using O=builddir + b) Passes ``allnoconfig``, ``allmodconfig`` -3: Builds on multiple CPU architectures by using local cross-compile tools + c) Builds successfully when using ``O=builddir`` + +3) Builds on multiple CPU architectures by using local cross-compile tools or some other build farm. -4: ppc64 is a good architecture for cross-compilation checking because it - tends to use `unsigned long' for 64-bit quantities. +4) ppc64 is a good architecture for cross-compilation checking because it + tends to use ``unsigned long`` for 64-bit quantities. -5: Check your patch for general style as detailed in - Documentation/development-process/CodingStyle.rst. Check for trivial violations with the - patch style checker prior to submission (scripts/checkpatch.pl). +5) Check your patch for general style as detailed in + :ref:`Documentation/development-process/CodingStyle.rst <codingstyle>`. + Check for trivial violations with the patch style checker prior to + submission (``scripts/checkpatch.pl``). You should be able to justify all violations that remain in your patch. -6: Any new or modified CONFIG options don't muck up the config menu. +6) Any new or modified ``CONFIG`` options don't muck up the config menu. -7: All new Kconfig options have help text. +7) All new ``Kconfig`` options have help text. -8: Has been carefully reviewed with respect to relevant Kconfig +8) Has been carefully reviewed with respect to relevant ``Kconfig`` combinations. This is very hard to get right with testing -- brainpower pays off here. -9: Check cleanly with sparse. +9) Check cleanly with sparse. -10: Use 'make checkstack' and 'make namespacecheck' and fix any problems - that they find. Note: checkstack does not point out problems explicitly, - but any one function that uses more than 512 bytes on the stack is a - candidate for change. +10) Use ``make checkstack`` and ``make namespacecheck`` and fix any problems + that they find. + + .. note:: + + ``checkstack`` does not point out problems explicitly, + but any one function that uses more than 512 bytes on the stack is a + candidate for change. 11: Include :ref:`kernel-doc <kernel_doc>` to document global kernel APIs. (Not required for static functions, but OK there also.) Use ``make htmldocs`` or ``make pdfdocs`` to check the :ref:`kernel-doc <kernel_doc>` and fix any issues. -12: Has been tested with CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, - CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES, - CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_ATOMIC_SLEEP, CONFIG_PROVE_RCU - and CONFIG_DEBUG_OBJECTS_RCU_HEAD all simultaneously enabled. +12) Has been tested with ``CONFIG_PREEMPT``, ``CONFIG_DEBUG_PREEMPT``, + ``CONFIG_DEBUG_SLAB``, ``CONFIG_DEBUG_PAGEALLOC``, ``CONFIG_DEBUG_MUTEXES``, + ``CONFIG_DEBUG_SPINLOCK``, ``CONFIG_DEBUG_ATOMIC_SLEEP``, + ``CONFIG_PROVE_RCU`` and ``CONFIG_DEBUG_OBJECTS_RCU_HEAD`` all + simultaneously enabled. -13: Has been build- and runtime tested with and without CONFIG_SMP and - CONFIG_PREEMPT. +13) Has been build- and runtime tested with and without ``CONFIG_SMP`` and + ``CONFIG_PREEMPT.`` -14: If the patch affects IO/Disk, etc: has been tested with and without - CONFIG_LBDAF. +14) If the patch affects IO/Disk, etc: has been tested with and without + ``CONFIG_LBDAF.`` -15: All codepaths have been exercised with all lockdep features enabled. +15) All codepaths have been exercised with all lockdep features enabled. -16: All new /proc entries are documented under Documentation/ +16) All new ``/proc`` entries are documented under ``Documentation/`` -17: All new kernel boot parameters are documented in - Documentation/kernel-parameters.txt. +17) All new kernel boot parameters are documented in + ``Documentation/kernel-parameters.txt``. -18: All new module parameters are documented with MODULE_PARM_DESC() +18) All new module parameters are documented with ``MODULE_PARM_DESC()`` -19: All new userspace interfaces are documented in Documentation/ABI/. - See Documentation/ABI/README for more information. +19) All new userspace interfaces are documented in ``Documentation/ABI/``. + See ``Documentation/ABI/README`` for more information. Patches that change userspace interfaces should be CCed to [email protected]. -20: Check that it all passes `make headers_check'. +20) Check that it all passes ``make headers_check``. -21: Has been checked with injection of at least slab and page-allocation - failures. See Documentation/fault-injection/. +21) Has been checked with injection of at least slab and page-allocation + failures. See ``Documentation/fault-injection/``. If the new code is substantial, addition of subsystem-specific fault injection might be appropriate. -22: Newly-added code has been compiled with `gcc -W' (use "make - EXTRA_CFLAGS=-W"). This will generate lots of noise, but is good for - finding bugs like "warning: comparison between signed and unsigned". +22) Newly-added code has been compiled with ``gcc -W`` (use + ``make EXTRA_CFLAGS=-W``). This will generate lots of noise, but is good + for finding bugs like "warning: comparison between signed and unsigned". -23: Tested after it has been merged into the -mm patchset to make sure +23) Tested after it has been merged into the -mm patchset to make sure that it still works with all of the other queued patches and various changes in the VM, VFS, and other subsystems. -24: All memory barriers {e.g., barrier(), rmb(), wmb()} need a comment in the - source code that explains the logic of what they are doing and why. +24) All memory barriers {e.g., ``barrier()``, ``rmb()``, ``wmb()``} need a + comment in the source code that explains the logic of what they are doing + and why. -25: If any ioctl's are added by the patch, then also update - Documentation/ioctl/ioctl-number.txt. +25) If any ioctl's are added by the patch, then also update + ``Documentation/ioctl/ioctl-number.txt``. -26: If your modified source code depends on or uses any of the kernel - APIs or features that are related to the following kconfig symbols, - then test multiple builds with the related kconfig symbols disabled - and/or =m (if that option is available) [not all of these at the +26) If your modified source code depends on or uses any of the kernel + APIs or features that are related to the following ``Kconfig`` symbols, + then test multiple builds with the related ``Kconfig`` symbols disabled + and/or ``=m`` (if that option is available) [not all of these at the same time, just various/random combinations of them]: - CONFIG_SMP, CONFIG_SYSFS, CONFIG_PROC_FS, CONFIG_INPUT, CONFIG_PCI, - CONFIG_BLOCK, CONFIG_PM, CONFIG_MAGIC_SYSRQ, - CONFIG_NET, CONFIG_INET=n (but latter with CONFIG_NET=y) + ``CONFIG_SMP``, ``CONFIG_SYSFS``, ``CONFIG_PROC_FS``, ``CONFIG_INPUT``, ``CONFIG_PCI``, ``CONFIG_BLOCK``, ``CONFIG_PM``, ``CONFIG_MAGIC_SYSRQ``, + ``CONFIG_NET``, ``CONFIG_INET=n`` (but latter with ``CONFIG_NET=y``).
Signature · 1 line
2.7.4
PATCH 7/17 SubmitChecklist: rename to RST and add to the development-proccess book
In reply to Mauro Carvalho ChehabAdd it to the development-process book, by renaming it to SubmitChecklist.rst and move it to the development-process directory.
---
.../{SubmitChecklist => development-process/SubmitChecklist.rst} | 2 +-
Documentation/development-process/index.rst | 1 +
Documentation/hwmon/submitting-patches | 2 +-
Documentation/ja_JP/SubmitChecklist | 4 ++--
Documentation/ja_JP/SubmittingPatches | 2 +-
Documentation/zh_CN/SubmittingPatches | 2 +-
6 files changed, 7 insertions(+), 6 deletions(-)
rename Documentation/{SubmitChecklist => development-process/SubmitChecklist.rst} (98%)Documentation/development-process/SubmitChecklist.rst renamed from Documentation/SubmitChecklist +1 -1
@@ -54,7 +54,7 @@ and elsewhere regarding submitting Linux kernel patches. but any one function that uses more than 512 bytes on the stack is a candidate for change. -11: Include :ref:`kernel-doc <kernel_doc>` to document global kernel APIs. +11) Include :ref:`kernel-doc <kernel_doc>` to document global kernel APIs. (Not required for static functions, but OK there also.) Use ``make htmldocs`` or ``make pdfdocs`` to check the :ref:`kernel-doc <kernel_doc>` and fix any issues.
Documentation/development-process/index.rst +1 -0
@@ -18,5 +18,6 @@ Contents: stable_kernel_rules kernel-docs applying-patches + SubmitChecklist development-process
Documentation/hwmon/submitting-patches +1 -1
@@ -10,7 +10,7 @@ increase the chances of your change being accepted. ---------- * It should be unnecessary to mention, but please read and follow - Documentation/SubmitChecklist + Documentation/development-process/SubmitChecklist.rst Documentation/development-process/SubmittingDrivers.rst Documentation/development-process/SubmittingPatches.rst Documentation/development-process/CodingStyle.rst
Documentation/ja_JP/SubmitChecklist +2 -2
@@ -1,5 +1,5 @@ NOTE: -This is a version of Documentation/SubmitChecklist into Japanese. +This is a version of Documentation/development-process/SubmitChecklist.rst into Japanese. This document is maintained by Takenori Nagano <[email protected]> and the JF Project team <http://www.linux.or.jp/JF/>. If you find any difference between this document and the original file
@@ -14,7 +14,7 @@ to update the original English file first. Last Updated: 2008/07/14 ================================== これは、 -linux-2.6.26/Documentation/SubmitChecklist の和訳です。 +linux-2.6.26/Documentation/development-process/SubmitChecklist.rst の和訳です。 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > 翻訳日: 2008/07/14
Documentation/ja_JP/SubmittingPatches +1 -1
@@ -34,7 +34,7 @@ Linux カーネルに変更を加えたいと思っている個人又は会社 おじけづかせることもあります。この文章はあなたの変更を大いに受け入れ てもらえやすくする提案を集めたものです。 -コードを投稿する前に、Documentation/SubmitChecklist の項目リストに目 +コードを投稿する前に、Documentation/development-process/SubmitChecklist.rst の項目リストに目 を通してチェックしてください。もしあなたがドライバーを投稿しようとし ているなら、Documentation/development-process/SubmittingDrivers.rst にも目を通してください。
Documentation/zh_CN/SubmittingPatches +1 -1
@@ -30,7 +30,7 @@ Documentation/development-process/SubmittingPatches.rst 的中文翻译 对于想要将改动提交到 Linux 内核的个人或者公司来说,如果不熟悉“规矩”, 提交的流程会让人畏惧。本文档收集了一系列建议,这些建议可以大大的提高你 的改动被接受的机会。 -阅读 Documentation/SubmitChecklist 来获得在提交代码前需要检查的项目的列 +阅读 Documentation/development-process/SubmitChecklist.rst 来获得在提交代码前需要检查的项目的列 表。如果你在提交一个驱动程序,那么同时阅读一下 Documentation/development-process/SubmittingDrivers.rst 。
Signature · 1 line
2.7.4
Re: [PATCH 07/17] SubmitChecklist: rename to RST and add to the development-proccess book
Quoted 14 lines · Mauro Carvalho Chehab
Add it to the development-process book, by renaming it to
SubmitChecklist.rstand move it to the development-process directory.Signed-off-by Mauro Carvalho Chehab <[email protected]>--- .../{SubmitChecklist => development-process/SubmitChecklist.rst} | 2 +- Documentation/development-process/index.rst | 1 + Documentation/hwmon/submitting-patches | 2 +- Documentation/ja_JP/SubmitChecklist | 4 ++-- Documentation/ja_JP/SubmittingPatches | 2 +- Documentation/zh_CN/SubmittingPatches | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) rename Documentation/{SubmitChecklist => development-process/SubmitChecklist.rst} (98%)
Quoted 1 line
(...)
For the hwmon part:
Signature · 2 lines
Jean Delvare SUSE L3 Support
PATCH 8/17 doc-rst: add CSS styles for :kbd: and :menuselection:
In reply to Mauro Carvalho ChehabAs we're about to use those two markups, add them to the theme style overrride.
--- Documentation/sphinx-static/theme_overrides.css | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
Documentation/sphinx-static/theme_overrides.css +14 -1
@@ -42,6 +42,20 @@ caption a.headerlink { opacity: 0; } caption a.headerlink:hover { opacity: 1; } + /* Menu selection and keystrokes */ + + span.menuselection { + color: blue; + font-family: "Courier New", Courier, monospace + } + + code.kbd, code.kbd span { + color: white; + background-color: darkblue; + font-weight: bold; + font-family: "Courier New", Courier, monospace + } + /* inline literal: drop the borderbox, padding and red color */ code, .rst-content tt, .rst-content code {
@@ -55,5 +69,4 @@ .rst-content tt.literal,.rst-content tt.literal,.rst-content code.literal { color: inherit; } - }
Signature · 1 line
2.7.4
PATCH 9/17 email-clients.txt: convert it to ReST markup
In reply to Mauro Carvalho ChehabAs this file is mentioned at the development-process/ book, let's convert it to ReST markup.
--- Documentation/development-process/5.Posting.rst | 2 +- .../development-process/SubmittingPatches.rst | 2 +- Documentation/email-clients.txt | 214 ++++++++++++--------- Documentation/ja_JP/SubmittingPatches | 2 +- Documentation/zh_CN/email-clients.txt | 4 +- 5 files changed, 127 insertions(+), 97 deletions(-)
Documentation/development-process/5.Posting.rst +1 -1
@@ -248,7 +248,7 @@ take care of: be examined in any detail. If there is any doubt at all, mail the patch to yourself and convince yourself that it shows up intact. - Documentation/email-clients.txt has some helpful hints on making + Documentation/development-process/email-clients.rst has some helpful hints on making specific mail clients work for sending patches. - Are you sure your patch is free of silly mistakes? You should always
Documentation/development-process/SubmittingPatches.rst +1 -1
@@ -368,7 +368,7 @@ decreasing the likelihood of your MIME-attached change being accepted. Exception: If your mailer is mangling patches then someone may ask you to re-send them using MIME. -See Documentation/email-clients.txt for hints about configuring +See Documentation/development-process/email-clients.rst for hints about configuring your e-mail client so that it sends your patches untouched. E-mail size
Documentation/email-clients.txt +122 -92
373 lines not on this page · raw message
Documentation/ja_JP/SubmittingPatches +1 -1
@@ -246,7 +246,7 @@ MIME 形式の添付ファイルは Linus に手間を取らせることにな あれば、誰かが MIME 形式のパッチを再送するよう求めるかもしれません。 余計な変更を加えずにあなたのパッチを送信するための電子メールクライアントの設定 -のヒントについては Documentation/email-clients.txt を参照してください。 +のヒントについては Documentation/development-process/email-clients.rst を参照してください。 8) 電子メールのサイズ
Documentation/zh_CN/email-clients.txt +2 -2
@@ -1,4 +1,4 @@ -Chinese translated version of Documentation/email-clients.txt +Chinese translated version of Documentation/development-process/email-clients.rst If you have any comment or update to the content, please contact the original document maintainer directly. However, if you have a problem
@@ -8,7 +8,7 @@ or if there is a problem with the translation. Chinese maintainer: Harry Wei <[email protected]> --------------------------------------------------------------------- -Documentation/email-clients.txt 的中文翻译 +Documentation/development-process/email-clients.rst 的中文翻译 如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
Signature · 1 line
2.7.4
PATCH 10/17 email-clients.txt: add it to the development-process book
In reply to Mauro Carvalho ChehabThis file is mentioned inside SubmittingPatches, and it is related to the patch submission process. So, move it to the right book, making Sphinx build it.
---
.../{email-clients.txt => development-process/email-clients.rst} | 0
Documentation/development-process/index.rst | 1 +
2 files changed, 1 insertion(+)
rename Documentation/{email-clients.txt => development-process/email-clients.rst} (100%)Documentation/development-process/email-clients.rst renamed from Documentation/email-clients.txt +0 -0
Documentation/development-process/index.rst +1 -0
@@ -18,6 +18,7 @@ Contents: stable_kernel_rules kernel-docs applying-patches + email-clients SubmitChecklist development-process
Signature · 1 line
2.7.4
PATCH 11/17 SubmittingPatches.rst: Add some cross-references
In reply to Mauro Carvalho ChehabThis file mentions some other documents already converted to ReST format. Add cross-references for them.
--- .../development-process/SubmitChecklist.rst | 2 ++ .../development-process/SubmittingPatches.rst | 24 ++++++++++++++-------- .../development-process/development-process.rst | 2 ++ .../development-process/email-clients.rst | 2 ++ 4 files changed, 21 insertions(+), 9 deletions(-)
Documentation/development-process/SubmitChecklist.rst +2 -0
@@ -1,3 +1,5 @@ +.. _submitchecklist: + Linux Kernel patch submission checklist ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Documentation/development-process/SubmittingPatches.rst +15 -9
@@ -10,10 +10,12 @@ can greatly increase the chances of your change being accepted. This document contains a large number of suggestions in a relatively terse format. For detailed information on how the kernel development process -works, see Documentation/development-process. Also, read -Documentation/SubmitChecklist for a list of items to check before +works, see :ref:`Documentation/development-process <development_process_main>`. +Also, read :ref:`Documentation/development-process/SubmitChecklist.rst <submitchecklist>` +for a list of items to check before submitting code. If you are submitting a driver, also read -Documentation/development-process/SubmittingDrivers.rst; for device tree binding patches, read +:ref:`Documentation/development-process/SubmittingDrivers.rst <submittingdrivers>`; +for device tree binding patches, read Documentation/devicetree/bindings/submitting-patches.txt. Many of these steps describe the default behavior of the git version
@@ -246,7 +248,9 @@ Style-check your changes ------------------------ Check your patch for basic style violations, details of which can be -found in Documentation/development-process/CodingStyle.rst. Failure to do so simply wastes +found in +:ref:`Documentation/development-process/CodingStyle.rst <codingstyle>`. +Failure to do so simply wastes the reviewers time and will get your patch rejected, probably without even being read.
@@ -313,8 +317,9 @@ toward the stable maintainers by putting a line like this: Cc: [email protected] into the sign-off area of your patch (note, NOT an email recipient). You -should also read Documentation/development-process/stable_kernel_rules.rst in addition to this -file. +should also read +:ref:`Documentation/development-process/stable_kernel_rules.rst <stable_kernel_rules>` +in addition to this file. Note, however, that some subsystem maintainers want to come to their own conclusions on which patches should go to the stable trees. The networking
@@ -368,8 +373,9 @@ decreasing the likelihood of your MIME-attached change being accepted. Exception: If your mailer is mangling patches then someone may ask you to re-send them using MIME. -See Documentation/development-process/email-clients.rst for hints about configuring -your e-mail client so that it sends your patches untouched. +See :ref:`Documentation/development-process/email-clients.rst <email_clients>` +for hints about configuring your e-mail client so that it sends your patches +untouched. E-mail size -----------
@@ -844,7 +850,7 @@ NO!!!! No more huge patch bombs to [email protected] people! <https://lkml.org/lkml/2005/7/11/336> Kernel Documentation/development-process/CodingStyle.rst: - <Documentation/development-process/CodingStyle.rst> + :ref:`Documentation/development-process/CodingStyle.rst <codingstyle>` Linus Torvalds's mail on the canonical patch format: <http://lkml.org/lkml/2005/4/7/183>
Documentation/development-process/development-process.rst +2 -0
@@ -1,3 +1,5 @@ +.. _development_process_main: + A guide to the Kernel Development Process =========================================
Documentation/development-process/email-clients.rst +2 -0
@@ -1,3 +1,5 @@ +.. _email_clients: + Email clients info for Linux ============================
Signature · 1 line
2.7.4
PATCH 12/17 SubmittingPatches.rst: enrich the Sphinx output
In reply to Mauro Carvalho ChehabDo a few changes to make the output look better:
- use bullets on trivial patches list;
- use monotonic font for tools name;
- use :manpage:foo for man pages;
- don't put all references to maintainer*html at the same line.
--- .../development-process/SubmittingPatches.rst | 100 +++++++++++---------- 1 file changed, 55 insertions(+), 45 deletions(-)
Documentation/development-process/SubmittingPatches.rst +55 -45
@@ -18,10 +18,10 @@ submitting code. If you are submitting a driver, also read for device tree binding patches, read Documentation/devicetree/bindings/submitting-patches.txt. -Many of these steps describe the default behavior of the git version -control system; if you use git to prepare your patches, you'll find much +Many of these steps describe the default behavior of the ``git`` version +control system; if you use ``git`` to prepare your patches, you'll find much of the mechanical work done for you, though you'll still need to prepare -and document a sensible set of patches. In general, use of git will make +and document a sensible set of patches. In general, use of ``git`` will make your life as a kernel developer easier. Creating and Sending your Change
@@ -32,7 +32,7 @@ Obtain a current source tree ---------------------------- If you do not have a repository with the current kernel source handy, use -git to obtain one. You'll want to start with the mainline repository, +``git`` to obtain one. You'll want to start with the mainline repository, which can be grabbed with: ::
@@ -53,13 +53,14 @@ in the next section), but that is the hard way to do kernel development. If you must generate your patches by hand, use ``diff -up`` or ``diff -uprN`` to create patches. Git generates patches in this form by default; if -you're using git, you can skip this section entirely. +you're using ``git``, you can skip this section entirely. All changes to the Linux kernel occur in the form of patches, as -generated by diff(1). When creating your patch, make sure to create it -in "unified diff" format, as supplied by the ``-u`` argument to diff(1). +generated by :manpage:`diff(1)`. When creating your patch, make sure to +create it in "unified diff" format, as supplied by the ``-u`` argument +to :manpage:`diff(1)`. Also, please use the ``-p`` argument which shows which C function each -change is in - that makes the resultant diff a lot easier to read. +change is in - that makes the resultant ``diff`` a lot easier to read. Patches should be based in the root kernel source directory, not in any lower subdirectory.
@@ -77,7 +78,7 @@ To create a patch for a single file, it is often sufficient to do: diff -up $SRCTREE/$MYFILE{.orig,} > /tmp/patch To create a patch for multiple files, you should unpack a "vanilla", -or unmodified kernel source tree, and generate a diff against your +or unmodified kernel source tree, and generate a ``diff`` against your own source tree. For example: ::
@@ -90,20 +91,20 @@ own source tree. For example: linux-3.19-vanilla $MYSRC > /tmp/patch ``dontdiff`` is a list of files which are generated by the kernel during -the build process, and should be ignored in any diff(1)-generated +the build process, and should be ignored in any :manpage:`diff(1)`-generated patch. Make sure your patch does not include any extra files which do not belong in a patch submission. Make sure to review your patch -after- -generating it with diff(1), to ensure accuracy. +generating it with :manpage:`diff(1)`, to ensure accuracy. If your changes produce a lot of deltas, you need to split them into individual patches which modify things in logical stages; see :ref:`split_changes`. This will facilitate review by other kernel developers, very important if you want your patch accepted. -If you're using git, ``git rebase -i`` can help you with this process. If -you're not using git, quilt <http://savannah.nongnu.org/projects/quilt> +If you're using ``git``, ``git rebase -i`` can help you with this process. If +you're not using ``git``, ``quilt`` <http://savannah.nongnu.org/projects/quilt> is another popular alternative. .. _describe_changes:
@@ -142,7 +143,7 @@ as you intend it to. The maintainer will thank you if you write your patch description in a form which can be easily pulled into Linux's source code management -system, git, as a "commit log". See :ref:`explicit_in_reply_to`. +system, ``git``, as a "commit log". See :ref:`explicit_in_reply_to`. Solve only one problem per patch. If your description starts to get long, that's a sign that you probably need to split up your patch.
@@ -165,7 +166,7 @@ its behaviour. If the patch fixes a logged bug entry, refer to that bug entry by number and URL. If the patch follows from a mailing list discussion, give a URL to the mailing list archive; use the https://lkml.kernel.org/ -redirector with a Message-Id, to ensure that the links cannot become +redirector with a ``Message-Id``, to ensure that the links cannot become stale. However, try to make your explanation understandable without external
@@ -192,15 +193,15 @@ there is no collision with your six-character ID now, that condition may change five years from now. If your patch fixes a bug in a specific commit, e.g. you found an issue using -git-bisect, please use the 'Fixes:' tag with the first 12 characters of the -SHA-1 ID, and the one line summary. For example: +``git bisect``, please use the 'Fixes:' tag with the first 12 characters of +the SHA-1 ID, and the one line summary. For example: :: Fixes: e21d2170f366 ("video: remove unnecessary platform_set_drvdata()") -The following git-config settings can be used to add a pretty format for -outputting the above style in the git log or git show commands +The following ``git config`` settings can be used to add a pretty format for +outputting the above style in the ``git log`` or ``git show`` commands ::
@@ -338,17 +339,17 @@ into the MAINTAINERS file for its current manager. Trivial patches must qualify for one of the following rules: - Spelling fixes in documentation - Spelling fixes for errors which could break grep(1) - Warning fixes (cluttering with useless warnings is bad) - Compilation fixes (only if they are actually correct) - Runtime fixes (only if they actually fix things) - Removing use of deprecated functions/macros - Contact detail and documentation fixes - Non-portable code replaced by portable code (even in arch-specific, - since people copy, as long as it's trivial) - Any fix by the author/maintainer of the file (ie. patch monkey - in re-transmission mode) +- Spelling fixes in documentation +- Spelling fixes for errors which could break :manpage:`grep(1)` +- Warning fixes (cluttering with useless warnings is bad) +- Compilation fixes (only if they are actually correct) +- Runtime fixes (only if they actually fix things) +- Removing use of deprecated functions/macros +- Contact detail and documentation fixes +- Non-portable code replaced by portable code (even in arch-specific, + since people copy, as long as it's trivial) +- Any fix by the author/maintainer of the file (ie. patch monkey + in re-transmission mode)
@@ -361,8 +362,11 @@ developer to be able to "quote" your changes, using standard e-mail tools, so that they may comment on specific portions of your code. For this reason, all patches should be submitted by e-mail "inline". -WARNING: Be wary of your editor's word-wrap corrupting your patch, -if you choose to cut-n-paste your patch. + +.. warning:: + + Be wary of your editor's word-wrap corrupting your patch, + if you choose to cut-n-paste your patch. Do not attach the patch as a MIME attachment, compressed or not. Many popular e-mail applications will not always transmit a MIME
@@ -633,7 +637,7 @@ The canonical patch format -------------------------- This section describes how the patch itself should be formatted. Note -that, if you have your patches stored in a git repository, proper patch +that, if you have your patches stored in a ``git`` repository, proper patch formatting can be had with ``git format-patch``. The tools cannot create the necessary text, though, so read the instructions below anyway.
@@ -660,7 +664,7 @@ The canonical patch message body contains the following: - Any additional comments not suitable for the changelog. - - The actual patch (diff output). + - The actual patch (``diff`` output). The Subject line format makes it very easy to sort the emails alphabetically by subject line - pretty much any email reader will
@@ -678,13 +682,13 @@ series`` is an ordered sequence of multiple, related patches). Bear in mind that the ``summary phrase`` of your email becomes a globally-unique identifier for that patch. It propagates all the way -into the git changelog. The ``summary phrase`` may later be used in +into the ``git`` changelog. The ``summary phrase`` may later be used in developer discussions which refer to the patch. People will want to google for the ``summary phrase`` to read discussion regarding that patch. It will also be the only thing that people may quickly see when, two or three months later, they are going through perhaps -thousands of patches using tools such as ``gitk`` or "git log ---oneline". +thousands of patches using tools such as ``gitk`` or ``git log +--oneline``. For these reasons, the ``summary`` must be no more than 70-75 characters, and it must describe both what the patch changes, as well
@@ -737,18 +741,18 @@ The ``---`` marker line serves the essential purpose of marking for patch handling tools where the changelog message ends. One good use for the additional comments after the ``---`` marker is for -a diffstat, to show what files have changed, and the number of -inserted and deleted lines per file. A diffstat is especially useful +a ``diffstat``, to show what files have changed, and the number of +inserted and deleted lines per file. A ``diffstat`` is especially useful on bigger patches. Other comments relevant only to the moment or the maintainer, not suitable for the permanent changelog, should also go here. A good example of such comments might be ``patch changelogs`` which describe what has changed between the v1 and v2 version of the patch. -If you are going to include a diffstat after the ``---`` marker, please -use diffstat options ``-p 1 -w 70`` so that filenames are listed from +If you are going to include a ``diffstat`` after the ``---`` marker, please +use ``diffstat`` options ``-p 1 -w 70`` so that filenames are listed from the top of the kernel source tree and don't use too much horizontal -space (easily fit in 80 columns, maybe with some indentation). (git +space (easily fit in 80 columns, maybe with some indentation). (``git`` generates appropriate diffstats by default.) See more details on the proper patch format in the following
@@ -796,9 +800,9 @@ interest on a single line; it should look something like: A pull request should also include an overall message saying what will be included in the request, a ``git shortlog`` listing of the patches -themselves, and a diffstat showing the overall effect of the patch series. +themselves, and a ``diffstat`` showing the overall effect of the patch series. The easiest way to get all this information together is, of course, to let -git do it for you with the ``git request-pull`` command. +``git`` do it for you with the ``git request-pull`` command. Some maintainers (including Linus) want to see pull requests from signed commits; that increases their confidence that the request actually came
@@ -810,7 +814,7 @@ signed by one or more core kernel developers. This step can be hard for new developers, but there is no way around it. Attending conferences can be a good way to find developers who can sign your key. -Once you have prepared a patch series in git that you wish to have somebody +Once you have prepared a patch series in ``git`` that you wish to have somebody pull, create a signed tag with ``git tag -s``. This will create a new tag identifying the last commit in the series and containing a signature created with your private key. You will also have the opportunity to add a
@@ -840,10 +844,15 @@ Jeff Garzik, "Linux kernel patch submission format". Greg Kroah-Hartman, "How to piss off a kernel subsystem maintainer". <http://www.kroah.com/log/linux/maintainer.html> + <http://www.kroah.com/log/linux/maintainer-02.html> + <http://www.kroah.com/log/linux/maintainer-03.html> + <http://www.kroah.com/log/linux/maintainer-04.html> + <http://www.kroah.com/log/linux/maintainer-05.html> + <http://www.kroah.com/log/linux/maintainer-06.html> NO!!!! No more huge patch bombs to [email protected] people!
@@ -857,5 +866,6 @@ Linus Torvalds's mail on the canonical patch format: Andi Kleen, "On submitting kernel patches" Some strategies to get difficult or controversial changes in. + http://halobates.de/on-submitting-patches.pdf
Signature · 1 line
2.7.4
PATCH 13/17 SubmittingDrivers.rst: add a cross reference to CodingStyle
In reply to Mauro Carvalho ChehabInstead of mentioning CodingStyle as a file, use a reference.
While here, do a minor update, pointing that the same rules for Kernel 2.6 apply up to the recent versions too.
--- Documentation/development-process/SubmittingDrivers.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Documentation/development-process/SubmittingDrivers.rst +4 -3
@@ -40,9 +40,9 @@ Linux 2.4: maintainer does not respond or you cannot find the appropriate maintainer then please contact Willy Tarreau <[email protected]>. -Linux 2.6: +Linux 2.6 and upper: The same rules apply as 2.4 except that you should follow linux-kernel - to track changes in API's. The final contact point for Linux 2.6 + to track changes in API's. The final contact point for Linux 2.6+ submissions is Andrew Morton. What Criteria Determine Acceptance
@@ -73,7 +73,8 @@ Interfaces: Code: Please use the Linux style of code formatting as documented - in Documentation/development-process/CodingStyle.rst. If you have sections of code + in :ref:`Documentation/development-process/CodingStyle.rst <codingStyle>`. + If you have sections of code that need to be in other formats, for example because they are shared with a windows driver kit and you want to maintain them just once separate them out nicely and note
Signature · 1 line
2.7.4
PATCH 14/17 stable_api_nonsense.rst: fix emphasis on Sphinx
In reply to Mauro Carvalho ChehabUnfortunately, Sphinx doesn't have a way to use underlines. So, let's replace _any_ by **any**.
--- Documentation/development-process/stable_api_nonsense.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/development-process/stable_api_nonsense.rst +1 -1
@@ -42,7 +42,7 @@ to worry about the in-kernel interfaces changing. For the majority of the world, they neither see this interface, nor do they care about it at all. -First off, I'm not going to address _any_ legal issues about closed +First off, I'm not going to address **any** legal issues about closed source, hidden source, binary blobs, source wrappers, or any other term that describes kernel drivers that do not have their source code released under the GPL. Please consult a lawyer if you have any legal
Signature · 1 line
2.7.4
PATCH 15/17 ManagementStyle.rst: avoid emphasis where not desired
In reply to Mauro Carvalho ChehabOn Spinx, anything like:
foo
bar
will output **foo** in bold. We don't want that on this text. So, add an extra line.
--- Documentation/development-process/ManagementStyle.rst | 2 ++ 1 file changed, 2 insertions(+)
Documentation/development-process/ManagementStyle.rst +2 -0
@@ -151,6 +151,7 @@ immediately falls under the heading of "not reversible", and becomes a no-no according to :ref:`decisions`. There's just a few simple rules here: + (1) don't call people d*ckheads (at least not in public) (2) learn how to apologize when you forgot rule (1)
@@ -164,6 +165,7 @@ you can call just about **anybody** a d*ckhead, and you often **will** be right), the harder it ends up being to apologize afterwards. To solve this problem, you really only have two options: + - get really good at apologies - spread the "love" out so evenly that nobody really ends up feeling like they get unfairly targeted. Make it inventive enough, and they
Signature · 1 line
2.7.4
PATCH 16/17 stable_kernel_rules.rst: Add cross-references to other ReST files
In reply to Mauro Carvalho ChehabAdd two references for files that were already converted to ReST.
--- Documentation/development-process/stable_kernel_rules.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Documentation/development-process/stable_kernel_rules.rst +5 -2
@@ -26,7 +26,9 @@ Rules on what kind of patches are accepted, and which ones are not, into the race can be exploited is also provided. - It cannot contain any "trivial" fixes in it (spelling changes, whitespace cleanups, etc). - - It must follow the Documentation/development-process/SubmittingPatches.rst rules. + - It must follow the + :ref:`Documentation/development-process/SubmittingPatches.rst <submittingpatches>` + rules. - It or an equivalent fix must already exist in Linus' tree (upstream).
@@ -37,7 +39,8 @@ Procedure for submitting patches to the -stable tree submission guidelines as described in Documentation/networking/netdev-FAQ.txt - Security patches should not be handled (solely) by the -stable review - process but should follow the procedures in Documentation/development-process/SecurityBugs.rst. + process but should follow the procedures in + :ref:`Documentation/development-process/SecurityBugs.rst <securitybugs>`. For all other submissions, choose one of the following procedures -----------------------------------------------------------------
Signature · 1 line
2.7.4
PATCH 17/17 applying-patches.rst: Update the information there
In reply to Mauro Carvalho ChehabThis document is old: it is from Kernel v2.6.12 days. Update it to the current status, and add a reference for the linux-next tree.
--- .../development-process/applying-patches.rst | 255 +++++++++------------ 1 file changed, 110 insertions(+), 145 deletions(-)
Documentation/development-process/applying-patches.rst +110 -145
@@ -7,7 +7,7 @@ Original by: Jesper Juhl, August 2005 Last update: - 2006-01-05 + 2016-09-14 A frequently asked question on the Linux Kernel Mailing List is how to apply
@@ -91,23 +91,23 @@ this: patch -p1 -i path/to/patch-x.y.z -If your patch file is compressed with gzip or bzip2 and you don't want to +If your patch file is compressed with gzip or xz and you don't want to uncompress it before applying it, then you can feed it to patch like this instead: :: - zcat path/to/patch-x.y.z.gz | patch -p1 - bzcat path/to/patch-x.y.z.bz2 | patch -p1 + xzcat path/to/patch-x.y.z.xz | patch -p1 + bzcat path/to/patch-x.y.z.gz | patch -p1 If you wish to uncompress the patch file by hand first before applying it (what I assume you've done in the examples below), then you simply run -gunzip or bunzip2 on the file -- like this: +gunzip or xz on the file -- like this: :: gunzip patch-x.y.z.gz - bunzip2 patch-x.y.z.bz2 + xz -d patch-x.y.z.xz Which will leave you with a plain text patch-x.y.z file that you can feed to patch via stdin or the ``-i`` argument, as you prefer.
@@ -227,16 +227,16 @@ You can use the ``interdiff`` program (http://cyberelk.net/tim/patchutils/) to generate a patch representing the differences between two patches and then apply the result. -This will let you move from something like 2.6.12.2 to 2.6.12.3 in a single +This will let you move from something like 4.7.2 to 4.7.3 in a single step. The -z flag to interdiff will even let you feed it patches in gzip or bzip2 compressed form directly without the use of zcat or bzcat or manual decompression. -Here's how you'd go from 2.6.12.2 to 2.6.12.3 in a single step: +Here's how you'd go from 4.7.2 to 4.7.3 in a single step: :: - interdiff -z ../patch-2.6.12.2.bz2 ../patch-2.6.12.3.gz | patch -p1 + interdiff -z ../patch-4.7.2.gz ../patch-4.7.3.gz | patch -p1 Although interdiff may save you a step or two you are generally advised to do the additional steps since interdiff can get things wrong in some cases.
@@ -258,21 +258,13 @@ The patches are available at http://kernel.org/ Most recent patches are linked from the front page, but they also have specific homes. -The 2.6.x.y (-stable) and 2.6.x patches live at +The 4.x.y (-stable) and 4.x patches live at - ftp://ftp.kernel.org/pub/linux/kernel/v2.6/ + ftp://ftp.kernel.org/pub/linux/kernel/v4.x/ The -rc patches live at - ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/ - -The -git patches live at - - ftp://ftp.kernel.org/pub/linux/kernel/v2.6/snapshots/ - -The -mm kernels live at - - ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/ + ftp://ftp.kernel.org/pub/linux/kernel/v4.x/testing/ In place of ``ftp.kernel.org`` you can use ``ftp.cc.kernel.org``, where cc is a country code. This way you'll be downloading from a mirror site that's most
@@ -281,53 +273,55 @@ less bandwidth used globally and less load on the main kernel.org servers -- these are good things, so do use mirrors when possible. -The 2.6.x kernels -================= +The 4.x kernels +=============== These are the base stable releases released by Linus. The highest numbered release is the most recent. If regressions or other serious flaws are found, then a -stable fix patch -will be released (see below) on top of this base. Once a new 2.6.x base +will be released (see below) on top of this base. Once a new 4.x base kernel is released, a patch is made available that is a delta between the -previous 2.6.x kernel and the new one. +previous 4.x kernel and the new one. -To apply a patch moving from 2.6.11 to 2.6.12, you'd do the following (note -that such patches do **NOT** apply on top of 2.6.x.y kernels but on top of the -base 2.6.x kernel -- if you need to move from 2.6.x.y to 2.6.x+1 you need to -first revert the 2.6.x.y patch). +To apply a patch moving from 4.6 to 4.7, you'd do the following (note +that such patches do **NOT** apply on top of 4.x.y kernels but on top of the +base 4.x kernel -- if you need to move from 4.x.y to 4.x+1 you need to +first revert the 4.x.y patch). Here are some examples: :: - # moving from 2.6.11 to 2.6.12 - $ cd ~/linux-2.6.11 # change to kernel source dir - $ patch -p1 < ../patch-2.6.12 # apply the 2.6.12 patch + # moving from 4.6 to 4.7 + + $ cd ~/linux-4.6 # change to kernel source dir + $ patch -p1 < ../patch-4.7 # apply the 4.7 patch $ cd .. - $ mv linux-2.6.11 linux-2.6.12 # rename source dir + $ mv linux-4.6 linux-4.7 # rename source dir + + # moving from 4.6.1 to 4.7 - # moving from 2.6.11.1 to 2.6.12 - $ cd ~/linux-2.6.11.1 # change to kernel source dir - $ patch -p1 -R < ../patch-2.6.11.1 # revert the 2.6.11.1 patch - # source dir is now 2.6.11 - $ patch -p1 < ../patch-2.6.12 # apply new 2.6.12 patch + $ cd ~/linux-4.6.1 # change to kernel source dir + $ patch -p1 -R < ../patch-4.6.1 # revert the 4.6.1 patch + # source dir is now 4.6 + $ patch -p1 < ../patch-4.7 # apply new 4.7 patch $ cd .. - $ mv linux-2.6.11.1 linux-2.6.12 # rename source dir + $ mv linux-4.6.1 linux-4.7 # rename source dir -The 2.6.x.y kernels -=================== +The 4.x.y kernels +================= -Kernels with 4-digit versions are -stable kernels. They contain small(ish) +Kernels with 3-digit versions are -stable kernels. They contain small(ish) critical fixes for security problems or significant regressions discovered -in a given 2.6.x kernel. +in a given 4.x kernel. This is the recommended branch for users who want the most recent stable kernel and are not interested in helping test development/experimental versions. -If no 2.6.x.y kernel is available, then the highest numbered 2.6.x kernel is +If no 4.x.y kernel is available, then the highest numbered 4.x kernel is the current stable kernel. .. note::
@@ -335,25 +329,25 @@ the current stable kernel. The -stable team usually do make incremental patches available as well as patches against the latest mainline release, but I only cover the non-incremental ones below. The incremental ones can be found at - ftp://ftp.kernel.org/pub/linux/kernel/v2.6/incr/ + ftp://ftp.kernel.org/pub/linux/kernel/v4.x/incr/ -These patches are not incremental, meaning that for example the 2.6.12.3 -patch does not apply on top of the 2.6.12.2 kernel source, but rather on top -of the base 2.6.12 kernel source. +These patches are not incremental, meaning that for example the 4.7.3 +patch does not apply on top of the 4.7.2 kernel source, but rather on top +of the base 4.7 kernel source. -So, in order to apply the 2.6.12.3 patch to your existing 2.6.12.2 kernel -source you have to first back out the 2.6.12.2 patch (so you are left with a -base 2.6.12 kernel source) and then apply the new 2.6.12.3 patch. +So, in order to apply the 4.7.3 patch to your existing 4.7.2 kernel +source you have to first back out the 4.7.2 patch (so you are left with a +base 4.7 kernel source) and then apply the new 4.7.3 patch. Here's a small example: :: - $ cd ~/linux-2.6.12.2 # change to the kernel source dir - $ patch -p1 -R < ../patch-2.6.12.2 # revert the 2.6.12.2 patch - $ patch -p1 < ../patch-2.6.12.3 # apply the new 2.6.12.3 patch + $ cd ~/linux-4.7.2 # change to the kernel source dir + $ patch -p1 -R < ../patch-4.7.2 # revert the 4.7.2 patch + $ patch -p1 < ../patch-4.7.3 # apply the new 4.7.3 patch $ cd .. - $ mv linux-2.6.12.2 linux-2.6.12.3 # rename the kernel source dir + $ mv linux-4.7.2 linux-4.7.3 # rename the kernel source dir The -rc kernels ===============
@@ -372,37 +366,40 @@ This is a good branch to run for people who want to help out testing development kernels but do not want to run some of the really experimental stuff (such people should see the sections about -git and -mm kernels below). -The -rc patches are not incremental, they apply to a base 2.6.x kernel, just -like the 2.6.x.y patches described above. The kernel version before the -rcN +The -rc patches are not incremental, they apply to a base 4.x kernel, just +like the 4.x.y patches described above. The kernel version before the -rcN suffix denotes the version of the kernel that this -rc kernel will eventually turn into. -So, 2.6.13-rc5 means that this is the fifth release candidate for the 2.6.13 -kernel and the patch should be applied on top of the 2.6.12 kernel source. +So, 4.8-rc5 means that this is the fifth release candidate for the 4.8 +kernel and the patch should be applied on top of the 4.7 kernel source. Here are 3 examples of how to apply these patches: :: - # first an example of moving from 2.6.12 to 2.6.13-rc3 - $ cd ~/linux-2.6.12 # change to the 2.6.12 source dir - $ patch -p1 < ../patch-2.6.13-rc3 # apply the 2.6.13-rc3 patch + # first an example of moving from 4.7 to 4.8-rc3 + + $ cd ~/linux-4.7 # change to the 4.7 source dir + $ patch -p1 < ../patch-4.8-rc3 # apply the 4.8-rc3 patch $ cd .. - $ mv linux-2.6.12 linux-2.6.13-rc3 # rename the source dir + $ mv linux-4.7 linux-4.8-rc3 # rename the source dir + + # now let's move from 4.8-rc3 to 4.8-rc5 - # now let's move from 2.6.13-rc3 to 2.6.13-rc5 - $ cd ~/linux-2.6.13-rc3 # change to the 2.6.13-rc3 dir - $ patch -p1 -R < ../patch-2.6.13-rc3 # revert the 2.6.13-rc3 patch - $ patch -p1 < ../patch-2.6.13-rc5 # apply the new 2.6.13-rc5 patch + $ cd ~/linux-4.8-rc3 # change to the 4.8-rc3 dir + $ patch -p1 -R < ../patch-4.8-rc3 # revert the 4.8-rc3 patch + $ patch -p1 < ../patch-4.8-rc5 # apply the new 4.8-rc5 patch $ cd .. - $ mv linux-2.6.13-rc3 linux-2.6.13-rc5 # rename the source dir + $ mv linux-4.8-rc3 linux-4.8-rc5 # rename the source dir + + # finally let's try and move from 4.7.3 to 4.8-rc5 - # finally let's try and move from 2.6.12.3 to 2.6.13-rc5 - $ cd ~/linux-2.6.12.3 # change to the kernel source dir - $ patch -p1 -R < ../patch-2.6.12.3 # revert the 2.6.12.3 patch - $ patch -p1 < ../patch-2.6.13-rc5 # apply new 2.6.13-rc5 patch + $ cd ~/linux-4.7.3 # change to the kernel source dir + $ patch -p1 -R < ../patch-4.7.3 # revert the 4.7.3 patch + $ patch -p1 < ../patch-4.8-rc5 # apply new 4.8-rc5 patch $ cd .. - $ mv linux-2.6.12.3 linux-2.6.13-rc5 # rename the kernel source dir + $ mv linux-4.7.3 linux-4.8-rc5 # rename the kernel source dir The -git kernels
@@ -416,100 +413,68 @@ Linus's tree. They are more experimental than -rc kernels since they are generated automatically without even a cursory glance to see if they are sane. --git patches are not incremental and apply either to a base 2.6.x kernel or -a base 2.6.x-rc kernel -- you can see which from their name. -A patch named 2.6.12-git1 applies to the 2.6.12 kernel source and a patch -named 2.6.13-rc3-git2 applies to the source of the 2.6.13-rc3 kernel. +-git patches are not incremental and apply either to a base 4.x kernel or +a base 4.x-rc kernel -- you can see which from their name. +A patch named 4.7-git1 applies to the 4.7 kernel source and a patch +named 4.8-rc3-git2 applies to the source of the 4.8-rc3 kernel. Here are some examples of how to apply these patches: :: - # moving from 2.6.12 to 2.6.12-git1 - $ cd ~/linux-2.6.12 # change to the kernel source dir - $ patch -p1 < ../patch-2.6.12-git1 # apply the 2.6.12-git1 patch - $ cd .. - $ mv linux-2.6.12 linux-2.6.12-git1 # rename the kernel source dir - - # moving from 2.6.12-git1 to 2.6.13-rc2-git3 - $ cd ~/linux-2.6.12-git1 # change to the kernel source dir - $ patch -p1 -R < ../patch-2.6.12-git1 # revert the 2.6.12-git1 patch - # we now have a 2.6.12 kernel - $ patch -p1 < ../patch-2.6.13-rc2 # apply the 2.6.13-rc2 patch - # the kernel is now 2.6.13-rc2 - $ patch -p1 < ../patch-2.6.13-rc2-git3 # apply the 2.6.13-rc2-git3 patch - # the kernel is now 2.6.13-rc2-git3 - $ cd .. - $ mv linux-2.6.12-git1 linux-2.6.13-rc2-git3 # rename source dir + # moving from 4.7 to 4.7-git1 + $ cd ~/linux-4.7 # change to the kernel source dir + $ patch -p1 < ../patch-4.7-git1 # apply the 4.7-git1 patch + $ cd .. + $ mv linux-4.7 linux-4.7-git1 # rename the kernel source dir -The -mm kernels -=============== + # moving from 4.7-git1 to 4.8-rc2-git3 -These are experimental kernels released by Andrew Morton. + $ cd ~/linux-4.7-git1 # change to the kernel source dir + $ patch -p1 -R < ../patch-4.7-git1 # revert the 4.7-git1 patch + # we now have a 4.7 kernel + $ patch -p1 < ../patch-4.8-rc2 # apply the 4.8-rc2 patch + # the kernel is now 4.8-rc2 + $ patch -p1 < ../patch-4.8-rc2-git3 # apply the 4.8-rc2-git3 patch + # the kernel is now 4.8-rc2-git3 + $ cd .. + $ mv linux-4.7-git1 linux-4.8-rc2-git3 # rename source dir -The -mm tree serves as a sort of proving ground for new features and other -experimental patches. -Once a patch has proved its worth in -mm for a while Andrew pushes it on to -Linus for inclusion in mainline. +The -mm patches and the linux-next tree +======================================= -Although it's encouraged that patches flow to Linus via the -mm tree, this -is not always enforced. +The -mm patches are experimental patches released by Andrew Morton. -Subsystem maintainers (or individuals) sometimes push their patches directly -to Linus, even though (or after) they have been merged and tested in -mm (or -sometimes even without prior testing in -mm). +In the past, -mm tree were used to also test subsystem patches, but this +function is now done via the +:ref:`linux-next <https://www.kernel.org/doc/man-pages/linux-next.html>` +tree. The Subsystem maintainers push their patches first to linux-next, +and, during the merge window, sends them directly to Linus. -You should generally strive to get your patches into mainline via -mm to -ensure maximum testing. +The -mm patches serve as a sort of proving ground for new features and other +experimental patches that aren't merged via a subsystem tree. +Once such patches has proved its worth in -mm for a while Andrew pushes +it on to Linus for inclusion in mainline. -This branch is in constant flux and contains many experimental features, a +The linux-next tree is daily updated, and includes the -mm patches. +Both are in constant flux and contains many experimental features, a lot of debugging patches not appropriate for mainline etc., and is the most experimental of the branches described in this document. -These kernels are not appropriate for use on systems that are supposed to be +These patches are not appropriate for use on systems that are supposed to be stable and they are more risky to run than any of the other branches (make sure you have up-to-date backups -- that goes for any experimental kernel but -even more so for -mm kernels). +even more so for -mm patches or using a Kernel from the linux-next tree). -These kernels in addition to all the other experimental patches they contain -usually also contain any changes in the mainline -git kernels available at -the time of release. +Testing of -mm patches and linux-next is greatly appreciated since the whole +point of those are to weed out regressions, crashes, data corruption bugs, +build breakage (and any other bug in general) before changes are merged into +the more stable mainline Linus tree. -Testing of -mm kernels is greatly appreciated since the whole point of the -tree is to weed out regressions, crashes, data corruption bugs, build -breakage (and any other bug in general) before changes are merged into the -more stable mainline Linus tree. - -But testers of -mm should be aware that breakage in this tree is more common -than in any other tree. - -The -mm kernels are not released on a fixed schedule, but usually a few -mm -kernels are released in between each -rc kernel (1 to 3 is common). - -The -mm kernels apply to either a base 2.6.x kernel (when no -rc kernels -have been released yet) or to a Linus -rc kernel. - -Here are some examples of applying the -mm patches: - -:: - - # moving from 2.6.12 to 2.6.12-mm1 - $ cd ~/linux-2.6.12 # change to the 2.6.12 source dir - $ patch -p1 < ../2.6.12-mm1 # apply the 2.6.12-mm1 patch - $ cd .. - $ mv linux-2.6.12 linux-2.6.12-mm1 # rename the source appropriately - - # moving from 2.6.12-mm1 to 2.6.13-rc3-mm3 - $ cd ~/linux-2.6.12-mm1 - $ patch -p1 -R < ../2.6.12-mm1 # revert the 2.6.12-mm1 patch - # we now have a 2.6.12 source - $ patch -p1 < ../patch-2.6.13-rc3 # apply the 2.6.13-rc3 patch - # we now have a 2.6.13-rc3 source - $ patch -p1 < ../2.6.13-rc3-mm3 # apply the 2.6.13-rc3-mm3 patch - $ cd .. - $ mv linux-2.6.12-mm1 linux-2.6.13-rc3-mm3 # rename the source dir +But testers of -mm and linux-next should be aware that breakages are +more common than in any other tree. This concludes this list of explanations of the various kernel trees.
Signature · 1 line
2.7.4