sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget./translations/zh_CN/process/submitting-patchesmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/zh_TW/process/submitting-patchesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/it_IT/process/submitting-patchesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ja_JP/process/submitting-patchesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ko_KR/process/submitting-patchesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/sp_SP/process/submitting-patchesmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhtarget)}(h.. _submittingpatches:h]h}(h]h ]h"]h$]h&]refidsubmittingpatchesuh1hhKhhhhhH/var/lib/git/docbuild/linux/Documentation/process/submitting-patches.rstubhsection)}(hhh](htitle)}(hLSubmitting patches: the essential guide to getting your code into the kernelh]hLSubmitting patches: the essential guide to getting your code into the kernel}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hX For a person or company who wishes to submit a change to the Linux kernel, the process can sometimes be daunting if you're not familiar with "the system." This text is a collection of suggestions which can greatly increase the chances of your change being accepted.h]hXFor a person or company who wishes to submit a change to the Linux kernel, the process can sometimes be daunting if you’re not familiar with “the system.” This text is a collection of suggestions which can greatly increase the chances of your change being accepted.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXThis document contains a large number of suggestions in a relatively terse format. For detailed information on how the kernel development process works, see Documentation/process/development-process.rst. Also, read Documentation/process/submit-checklist.rst for a list of items to check before submitting code. For device tree binding patches, read Documentation/devicetree/bindings/submitting-patches.rst.h]hXThis document contains a large number of suggestions in a relatively terse format. For detailed information on how the kernel development process works, see Documentation/process/development-process.rst. Also, read Documentation/process/submit-checklist.rst for a list of items to check before submitting code. For device tree binding patches, read Documentation/devicetree/bindings/submitting-patches.rst.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hThis documentation assumes that you're using ``git`` to prepare your patches. If you're unfamiliar with ``git``, you would be well-advised to learn how to use it, it will make your life as a kernel developer and in general much easier.h](h/This documentation assumes that you’re using }(hhhhhNhNubhliteral)}(h``git``h]hgit}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh6 to prepare your patches. If you’re unfamiliar with }(hhhhhNhNubh)}(h``git``h]hgit}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh|, you would be well-advised to learn how to use it, it will make your life as a kernel developer and in general much easier.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hSome subsystems and maintainer trees have additional information about their workflow and expectations, see :ref:`Documentation/process/maintainer-handbooks.rst `.h](hlSome subsystems and maintainer trees have additional information about their workflow and expectations, see }(hjhhhNhNubh)}(hQ:ref:`Documentation/process/maintainer-handbooks.rst `h]hinline)}(hj!h]h.Documentation/process/maintainer-handbooks.rst}(hj%hhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1j#hjubah}(h]h ]h"]h$]h&]refdocprocess/submitting-patches refdomainj0reftyperef refexplicitrefwarn reftargetmaintainer_handbooks_mainuh1hhhhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hObtain a current source treeh]hObtain a current source tree}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhhhhhKubh)}(hIf 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, which can be grabbed with::h](hJIf you do not have a repository with the current kernel source handy, use }(hj_hhhNhNubh)}(h``git``h]hgit}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_ubh` to obtain one. You’ll want to start with the mainline repository, which can be grabbed with:}(hj_hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjNhhubh literal_block)}(hJgit clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.gith]hJgit clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhK#hjNhhubh)}(hXJNote, however, that you may not want to develop against the mainline tree directly. Most subsystem maintainers run their own trees and want to see patches prepared against those trees. See the **T:** entry for the subsystem in the MAINTAINERS file to find that tree, or simply ask the maintainer if the tree is not listed there.h](hNote, however, that you may not want to develop against the mainline tree directly. Most subsystem maintainers run their own trees and want to see patches prepared against those trees. See the }(hjhhhNhNubhstrong)}(h**T:**h]hT:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh entry for the subsystem in the MAINTAINERS file to find that tree, or simply ask the maintainer if the tree is not listed there.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK%hjNhhubh)}(h.. _describe_changes:h]h}(h]h ]h"]h$]h&]hdescribe-changesuh1hhK+hjNhhhhubeh}(h]obtain-a-current-source-treeah ]h"]obtain a current source treeah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hDescribe your changesh]hDescribe your changes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK.ubh)}(hX'Describe your problem. Whether your patch is a one-line bug fix or 5000 lines of a new feature, there must be an underlying problem that motivated you to do this work. Convince the reviewer that there is a problem worth fixing and that it makes sense for them to read past the first paragraph.h]hX'Describe your problem. Whether your patch is a one-line bug fix or 5000 lines of a new feature, there must be an underlying problem that motivated you to do this work. Convince the reviewer that there is a problem worth fixing and that it makes sense for them to read past the first paragraph.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjhhubh)}(hXRDescribe user-visible impact. Straight up crashes and lockups are pretty convincing, but not all bugs are that blatant. Even if the problem was spotted during code review, describe the impact you think it can have on users. Keep in mind that the majority of Linux installations run kernels from secondary stable trees or vendor/product-specific trees that cherry-pick only specific patches from upstream, so include anything that could help route your change downstream: provoking circumstances, excerpts from dmesg, crash descriptions, performance regressions, latency spikes, lockups, etc.h]hXRDescribe user-visible impact. Straight up crashes and lockups are pretty convincing, but not all bugs are that blatant. Even if the problem was spotted during code review, describe the impact you think it can have on users. Keep in mind that the majority of Linux installations run kernels from secondary stable trees or vendor/product-specific trees that cherry-pick only specific patches from upstream, so include anything that could help route your change downstream: provoking circumstances, excerpts from dmesg, crash descriptions, performance regressions, latency spikes, lockups, etc.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjhhubh)}(hXQuantify optimizations and trade-offs. If you claim improvements in performance, memory consumption, stack footprint, or binary size, include numbers that back them up. But also describe non-obvious costs. Optimizations usually aren't free but trade-offs between CPU, memory, and readability; or, when it comes to heuristics, between different workloads. Describe the expected downsides of your optimization so that the reviewer can weigh costs against benefits.h]hXQuantify optimizations and trade-offs. If you claim improvements in performance, memory consumption, stack footprint, or binary size, include numbers that back them up. But also describe non-obvious costs. Optimizations usually aren’t free but trade-offs between CPU, memory, and readability; or, when it comes to heuristics, between different workloads. Describe the expected downsides of your optimization so that the reviewer can weigh costs against benefits.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK@hjhhubh)}(hOnce the problem is established, describe what you are actually doing about it in technical detail. It's important to describe the change in plain English for the reviewer to verify that the code is behaving as you intend it to.h]hOnce the problem is established, describe what you are actually doing about it in technical detail. It’s important to describe the change in plain English for the reviewer to verify that the code is behaving as you intend it to.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKHhjhhubh)}(hThe 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:`the_canonical_patch_format`.h](hThe 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, }(hjhhhNhNubh)}(h``git``h]hgit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh, as a “commit log”. See }(hjhhhNhNubh)}(h!:ref:`the_canonical_patch_format`h]j$)}(hj+h]hthe_canonical_patch_format}(hj-hhhNhNubah}(h]h ](j/stdstd-refeh"]h$]h&]uh1j#hj)ubah}(h]h ]h"]h$]h&]refdocj< refdomainj7reftyperef refexplicitrefwarnjBthe_canonical_patch_formatuh1hhhhKMhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKMhjhhubh)}(hSolve 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. See :ref:`split_changes`.h](hSolve 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. See }(hjShhhNhNubh)}(h:ref:`split_changes`h]j$)}(hj]h]h split_changes}(hj_hhhNhNubah}(h]h ](j/stdstd-refeh"]h$]h&]uh1j#hj[ubah}(h]h ]h"]h$]h&]refdocj< refdomainjireftyperef refexplicitrefwarnjB split_changesuh1hhhhKQhjSubh.}(hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKQhjhhubh)}(hXWhen you submit or resubmit a patch or patch series, include the complete patch description and justification for it. Don't just say that this is version N of the patch (series). Don't expect the subsystem maintainer to refer back to earlier patch versions or referenced URLs to find the patch description and put that into the patch. I.e., the patch (series) and its description should be self-contained. This benefits both the maintainers and reviewers. Some reviewers probably didn't even receive earlier versions of the patch.h]hXWhen you submit or resubmit a patch or patch series, include the complete patch description and justification for it. Don’t just say that this is version N of the patch (series). Don’t expect the subsystem maintainer to refer back to earlier patch versions or referenced URLs to find the patch description and put that into the patch. I.e., the patch (series) and its description should be self-contained. This benefits both the maintainers and reviewers. Some reviewers probably didn’t even receive earlier versions of the patch.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhjhhubh)}(hDescribe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders to the codebase to change its behaviour.h]hDescribe your changes in imperative mood, e.g. “make xyzzy do frotz” instead of “[This patch] makes xyzzy do frotz” or “[I] changed xyzzy to do frotz”, as if you are giving orders to the codebase to change its behaviour.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hjhhubh)}(hIf you want to refer to a specific commit, don't just refer to the SHA-1 ID of the commit. Please also include the oneline summary of the commit, to make it easier for reviewers to know what it is about. Example::h]hIf you want to refer to a specific commit, don’t just refer to the SHA-1 ID of the commit. Please also include the oneline summary of the commit, to make it easier for reviewers to know what it is about. Example:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchjhhubj)}(hCommit e21d2170f36602ae2708 ("video: remove unnecessary platform_set_drvdata()") removed the unnecessary platform_set_drvdata(), but left the variable "dev" unused, delete it.h]hCommit e21d2170f36602ae2708 ("video: remove unnecessary platform_set_drvdata()") removed the unnecessary platform_set_drvdata(), but left the variable "dev" unused, delete it.}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhhjhhubh)}(hX=You should also be sure to use at least the first twelve characters of the SHA-1 ID. The kernel repository holds a *lot* of objects, making collisions with shorter IDs a real possibility. Bear in mind that, even if there is no collision with your six-character ID now, that condition may change five years from now.h](htYou should also be sure to use at least the first twelve characters of the SHA-1 ID. The kernel repository holds a }(hjhhhNhNubhemphasis)}(h*lot*h]hlot}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh of objects, making collisions with shorter IDs a real possibility. Bear in mind that, even if there is no collision with your six-character ID now, that condition may change five years from now.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKmhjhhubh)}(hIf related discussions or any other background information behind the change can be found on the web, add 'Link:' tags pointing to it. If the patch is a result of some earlier mailing list discussions or something documented on the web, point to it.h]hIf related discussions or any other background information behind the change can be found on the web, add ‘Link:’ tags pointing to it. If the patch is a result of some earlier mailing list discussions or something documented on the web, point to it.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjhhubh)}(hWhen linking to mailing list archives, preferably use the lore.kernel.org message archiver service. To create the link URL, use the contents of the ``Message-ID`` header of the message without the surrounding angle brackets. For example::h](hWhen linking to mailing list archives, preferably use the lore.kernel.org message archiver service. To create the link URL, use the contents of the }(hjhhhNhNubh)}(h``Message-ID``h]h Message-ID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhK header of the message without the surrounding angle brackets. For example:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKxhjhhubj)}(hHLink: https://lore.kernel.org/30th.anniversary.repost@klaava.Helsinki.FIh]hHLink: https://lore.kernel.org/30th.anniversary.repost@klaava.Helsinki.FI}hj sbah}(h]h ]h"]h$]h&]jjuh1jhhhK}hjhhubh)}(hbPlease check the link to make sure that it is actually working and points to the relevant message.h]hbPlease check the link to make sure that it is actually working and points to the relevant message.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hHowever, try to make your explanation understandable without external resources. In addition to giving a URL to a mailing list archive or bug, summarize the relevant points of the discussion that led to the patch as submitted.h]hHowever, try to make your explanation understandable without external resources. In addition to giving a URL to a mailing list archive or bug, summarize the relevant points of the discussion that led to the patch as submitted.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hIn case your patch fixes a bug, use the 'Closes:' tag with a URL referencing the report in the mailing list archives or a public bug tracker. For example::h]hIn case your patch fixes a bug, use the ‘Closes:’ tag with a URL referencing the report in the mailing list archives or a public bug tracker. For example:}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(h'Closes: https://example.com/issues/1234h]h'Closes: https://example.com/issues/1234}hjEsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hSome bug trackers have the ability to close issues automatically when a commit with such a tag is applied. Some bots monitoring mailing lists can also track such tags and take certain actions. Private bug trackers and invalid URLs are forbidden.h]hSome bug trackers have the ability to close issues automatically when a commit with such a tag is applied. Some bots monitoring mailing lists can also track such tags and take certain actions. Private bug trackers and invalid URLs are forbidden.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX_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 at least the first 12 characters of the SHA-1 ID, and the one line summary. Do not split the tag across multiple lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify parsing scripts. For example::h](hNIf your patch fixes a bug in a specific commit, e.g. you found an issue using }(hjahhhNhNubh)}(h``git bisect``h]h git bisect}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjaubhX , please use the ‘Fixes:’ tag with at least the first 12 characters of the SHA-1 ID, and the one line summary. Do not split the tag across multiple lines, tags are exempt from the “wrap at 75 columns” rule in order to simplify parsing scripts. For example:}(hjahhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hfFixes: 54a4f0239f2e ("KVM: MMU: make kvm_mmu_zap_page() return the number of pages it actually freed")h]hfFixes: 54a4f0239f2e ("KVM: MMU: make kvm_mmu_zap_page() return the number of pages it actually freed")}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hThe 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::h](hThe following }(hjhhhNhNubh)}(h``git config``h]h git config}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhS settings can be used to add a pretty format for outputting the above style in the }(hjhhhNhNubh)}(h ``git log``h]hgit log}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh or }(hjhhhNhNubh)}(h ``git show``h]hgit show}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh commands:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hF[core] abbrev = 12 [pretty] fixes = Fixes: %h (\"%s\")h]hF[core] abbrev = 12 [pretty] fixes = Fixes: %h (\"%s\")}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hAn example call::h]hAn example call:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(h$ git log -1 --pretty=fixes 54a4f0239f2e Fixes: 54a4f0239f2e ("KVM: MMU: make kvm_mmu_zap_page() return the number of pages it actually freed")h]h$ git log -1 --pretty=fixes 54a4f0239f2e Fixes: 54a4f0239f2e ("KVM: MMU: make kvm_mmu_zap_page() return the number of pages it actually freed")}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(h.. _split_changes:h]h}(h]h ]h"]h$]h&]h split-changesuh1hhKhjhhhhubeh}(h](describe-your-changesjeh ]h"](describe your changesdescribe_changeseh$]h&]uh1hhhhhhhhK.expect_referenced_by_name}jjsexpect_referenced_by_id}jjsubh)}(hhh](h)}(hSeparate your changesh]hSeparate your changes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h7Separate each **logical change** into a separate patch.h](hSeparate each }(hj&hhhNhNubj)}(h**logical change**h]hlogical change}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh into a separate patch.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX For example, if your changes include both bug fixes and performance enhancements for a single driver, separate those changes into two or more patches. If your changes include an API update, and a new driver which uses that new API, separate those into two patches.h]hX For example, if your changes include both bug fixes and performance enhancements for a single driver, separate those changes into two or more patches. If your changes include an API update, and a new driver which uses that new API, separate those into two patches.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hOn the other hand, if you make a single change to numerous files, group those changes into a single patch. Thus a single logical change is contained within a single patch.h]hOn the other hand, if you make a single change to numerous files, group those changes into a single patch. Thus a single logical change is contained within a single patch.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe point to remember is that each patch should make an easily understood change that can be verified by reviewers. Each patch should be justifiable on its own merits.h]hThe point to remember is that each patch should make an easily understood change that can be verified by reviewers. Each patch should be justifiable on its own merits.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hIf one patch depends on another patch in order for a change to be complete, that is OK. Simply note **"this patch depends on patch X"** in your patch description.h](heIf one patch depends on another patch in order for a change to be complete, that is OK. Simply note }(hjphhhNhNubj)}(h#**"this patch depends on patch X"**h]h#“this patch depends on patch X”}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubh in your patch description.}(hjphhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXCWhen dividing your change into a series of patches, take special care to ensure that the kernel builds and runs properly after each patch in the series. Developers using ``git bisect`` to track down a problem can end up splitting your patch series at any point; they will not thank you if you introduce bugs in the middle.h](hWhen dividing your change into a series of patches, take special care to ensure that the kernel builds and runs properly after each patch in the series. Developers using }(hjhhhNhNubh)}(h``git bisect``h]h git bisect}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh to track down a problem can end up splitting your patch series at any point; they will not thank you if you introduce bugs in the middle.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hIf you cannot condense your patch set into a smaller set of patches, then only post say 15 or so at a time and wait for review and integration.h]hIf you cannot condense your patch set into a smaller set of patches, then only post say 15 or so at a time and wait for review and integration.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h](separate-your-changesjeh ]h"](separate your changes split_changeseh$]h&]uh1hhhhhhhhKj}jjsj}jjsubh)}(hhh](h)}(hStyle-check your changesh]hStyle-check your changes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hCheck your patch for basic style violations, details of which can be found in Documentation/process/coding-style.rst. Failure to do so simply wastes the reviewers time and will get your patch rejected, probably without even being read.h]hCheck your patch for basic style violations, details of which can be found in Documentation/process/coding-style.rst. Failure to do so simply wastes the reviewers time and will get your patch rejected, probably without even being read.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX_One significant exception is when moving code from one file to another -- in this case you should not modify the moved code at all in the same patch which moves it. This clearly delineates the act of moving the code and your changes. This greatly aids review of the actual differences and allows tools to better track the history of the code itself.h]hX_One significant exception is when moving code from one file to another -- in this case you should not modify the moved code at all in the same patch which moves it. This clearly delineates the act of moving the code and your changes. This greatly aids review of the actual differences and allows tools to better track the history of the code itself.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXCheck your patches with the patch style checker prior to submission (scripts/checkpatch.pl). Note, though, that the style checker should be viewed as a guide, not as a replacement for human judgment. If your code looks better with a violation then its probably best left alone.h]hXCheck your patches with the patch style checker prior to submission (scripts/checkpatch.pl). Note, though, that the style checker should be viewed as a guide, not as a replacement for human judgment. If your code looks better with a violation then its probably best left alone.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhdefinition_list)}(hhh]hdefinition_list_item)}(hThe checker reports at three levels: - ERROR: things that are very likely to be wrong - WARNING: things requiring careful review - CHECK: things requiring thought h](hterm)}(h$The checker reports at three levels:h]h$The checker reports at three levels:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubh definition)}(hhh]h bullet_list)}(hhh](h list_item)}(h.ERROR: things that are very likely to be wrongh]h)}(hj-h]h.ERROR: things that are very likely to be wrong}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj+ubah}(h]h ]h"]h$]h&]uh1j)hj&ubj*)}(h(WARNING: things requiring careful reviewh]h)}(hjDh]h(WARNING: things requiring careful review}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjBubah}(h]h ]h"]h$]h&]uh1j)hj&ubj*)}(h CHECK: things requiring thought h]h)}(hCHECK: things requiring thoughth]hCHECK: things requiring thought}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjYubah}(h]h ]h"]h$]h&]uh1j)hj&ubeh}(h]h ]h"]h$]h&]bullet-uh1j$hhhKhj!ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j hhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubh)}(hGYou should be able to justify all violations that remain in your patch.h]hGYou should be able to justify all violations that remain in your patch.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]style-check-your-changesah ]h"]style-check your changesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h$Select the recipients for your patchh]h$Select the recipients for your patch}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXYou should always copy the appropriate subsystem maintainer(s) and list(s) on any patch to code that they maintain; look through the MAINTAINERS file and the source code revision history to see who those maintainers are. The script scripts/get_maintainer.pl can be very useful at this step (pass paths to your patches as arguments to scripts/get_maintainer.pl). If you cannot find a maintainer for the subsystem you are working on, Andrew Morton (akpm@linux-foundation.org) serves as a maintainer of last resort.h](hXYou should always copy the appropriate subsystem maintainer(s) and list(s) on any patch to code that they maintain; look through the MAINTAINERS file and the source code revision history to see who those maintainers are. The script scripts/get_maintainer.pl can be very useful at this step (pass paths to your patches as arguments to scripts/get_maintainer.pl). If you cannot find a maintainer for the subsystem you are working on, Andrew Morton (}(hjhhhNhNubh reference)}(hakpm@linux-foundation.orgh]hakpm@linux-foundation.org}(hjhhhNhNubah}(h]h ]h"]h$]h&]refuri mailto:akpm@linux-foundation.orguh1jhjubh() serves as a maintainer of last resort.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hlinux-kernel@vger.kernel.org should be used by default for all patches, but the volume on that list has caused a number of developers to tune it out. Please do not spam unrelated lists and unrelated people, though.h](j)}(hlinux-kernel@vger.kernel.orgh]hlinux-kernel@vger.kernel.org}(hjhhhNhNubah}(h]h ]h"]h$]h&]refuri#mailto:linux-kernel@vger.kernel.orguh1jhjubh should be used by default for all patches, but the volume on that list has caused a number of developers to tune it out. Please do not spam unrelated lists and unrelated people, though.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hMany kernel-related lists are hosted at kernel.org; you can find a list of them at https://subspace.kernel.org. There are kernel-related lists hosted elsewhere as well, though.h](hSMany kernel-related lists are hosted at kernel.org; you can find a list of them at }(hjhhhNhNubj)}(hhttps://subspace.kernel.orgh]hhttps://subspace.kernel.org}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubhC. There are kernel-related lists hosted elsewhere as well, though.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX'Linus Torvalds is the final arbiter of all changes accepted into the Linux kernel. His e-mail address is . He gets a lot of e-mail, and, at this point, very few patches go through Linus directly, so typically you should do your best to -avoid- sending him e-mail.h](hkLinus Torvalds is the final arbiter of all changes accepted into the Linux kernel. His e-mail address is <}(hjhhhNhNubj)}(htorvalds@linux-foundation.orgh]htorvalds@linux-foundation.org}(hjhhhNhNubah}(h]h ]h"]h$]h&]refuri$mailto:torvalds@linux-foundation.orguh1jhjubh>. He gets a lot of e-mail, and, at this point, very few patches go through Linus directly, so typically you should do your best to -avoid- sending him e-mail.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXJIf you have a patch that fixes an exploitable security bug, send that patch to security@kernel.org. For severe bugs, a short embargo may be considered to allow distributors to get the patch out to users; in such cases, obviously, the patch should not be sent to any public lists. See also Documentation/process/security-bugs.rst.h](hOIf you have a patch that fixes an exploitable security bug, send that patch to }(hj7hhhNhNubj)}(hsecurity@kernel.orgh]hsecurity@kernel.org}(hj?hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:security@kernel.orguh1jhj7ubh. For severe bugs, a short embargo may be considered to allow distributors to get the patch out to users; in such cases, obviously, the patch should not be sent to any public lists. See also Documentation/process/security-bugs.rst.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hPatches that fix a severe bug in a released kernel should be directed toward the stable maintainers by putting a line like this::h]hPatches that fix a severe bug in a released kernel should be directed toward the stable maintainers by putting a line like this:}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(hCc: stable@vger.kernel.orgh]hCc: stable@vger.kernel.org}hjgsbah}(h]h ]h"]h$]h&]jjuh1jhhhM hjhhubh)}(hinto the sign-off area of your patch (note, NOT an email recipient). You should also read Documentation/process/stable-kernel-rules.rst in addition to this document.h]hinto the sign-off area of your patch (note, NOT an email recipient). You should also read Documentation/process/stable-kernel-rules.rst in addition to this document.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubh)}(hX=If changes affect userland-kernel interfaces, please send the MAN-PAGES maintainer (as listed in the MAINTAINERS file) a man-pages patch, or at least a notification of the change, so that some information makes its way into the manual pages. User-space API changes should also be copied to linux-api@vger.kernel.org.h](hX#If changes affect userland-kernel interfaces, please send the MAN-PAGES maintainer (as listed in the MAINTAINERS file) a man-pages patch, or at least a notification of the change, so that some information makes its way into the manual pages. User-space API changes should also be copied to }(hjhhhNhNubj)}(hlinux-api@vger.kernel.orgh]hlinux-api@vger.kernel.org}(hjhhhNhNubah}(h]h ]h"]h$]h&]refuri mailto:linux-api@vger.kernel.orguh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]$select-the-recipients-for-your-patchah ]h"]$select the recipients for your patchah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hCNo MIME, no links, no compression, no attachments. Just plain texth]hCNo MIME, no links, no compression, no attachments. Just plain text}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hX Linus and other kernel developers need to be able to read and comment on the changes you are submitting. It is important for a kernel developer to be able to "quote" your changes, using standard e-mail tools, so that they may comment on specific portions of your code.h]hXLinus and other kernel developers need to be able to read and comment on the changes you are submitting. It is important for a kernel developer to be able to “quote” your changes, using standard e-mail tools, so that they may comment on specific portions of your code.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hFor this reason, all patches should be submitted by e-mail "inline". The easiest way to do this is with ``git send-email``, which is strongly recommended. An interactive tutorial for ``git send-email`` is available at https://git-send-email.io.h](hlFor this reason, all patches should be submitted by e-mail “inline”. The easiest way to do this is with }(hjhhhNhNubh)}(h``git send-email``h]hgit send-email}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh>, which is strongly recommended. An interactive tutorial for }(hjhhhNhNubh)}(h``git send-email``h]hgit send-email}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh is available at }(hjhhhNhNubj)}(hhttps://git-send-email.ioh]hhttps://git-send-email.io}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h,If you choose not to use ``git send-email``:h](hIf you choose not to use }(hjhhhNhNubh)}(h``git send-email``h]hgit send-email}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM#hjhhubhwarning)}(hbBe wary of your editor's word-wrap corrupting your patch, if you choose to cut-n-paste your patch.h]h)}(hbBe wary of your editor's word-wrap corrupting your patch, if you choose to cut-n-paste your patch.h]hdBe wary of your editor’s word-wrap corrupting your patch, if you choose to cut-n-paste your patch.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj3ubah}(h]h ]h"]h$]h&]uh1j1hjhhhhhNubh)}(hXPDo not attach the patch as a MIME attachment, compressed or not. Many popular e-mail applications will not always transmit a MIME attachment as plain text, making it impossible to comment on your code. A MIME attachment also takes Linus a bit more time to process, decreasing the likelihood of your MIME-attached change being accepted.h]hXPDo not attach the patch as a MIME attachment, compressed or not. Many popular e-mail applications will not always transmit a MIME attachment as plain text, making it impossible to comment on your code. A MIME attachment also takes Linus a bit more time to process, decreasing the likelihood of your MIME-attached change being accepted.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hjhhubh)}(hcException: If your mailer is mangling patches then someone may ask you to re-send them using MIME.h]hcException: If your mailer is mangling patches then someone may ask you to re-send them using MIME.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hjhhubh)}(hSee Documentation/process/email-clients.rst for hints about configuring your e-mail client so that it sends your patches untouched.h]hSee Documentation/process/email-clients.rst for hints about configuring your e-mail client so that it sends your patches untouched.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hjhhubeh}(h]>no-mime-no-links-no-compression-no-attachments-just-plain-textah ]h"]Bno mime, no links, no compression, no attachments. just plain textah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hRespond to review commentsh]hRespond to review comments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hhhhhM7ubh)}(hXYour patch will almost certainly get comments from reviewers on ways in which the patch can be improved, in the form of a reply to your email. You must respond to those comments; ignoring reviewers is a good way to get ignored in return. You can simply reply to their emails to answer their comments. Review comments or questions that do not lead to a code change should almost certainly bring about a comment or changelog entry so that the next reviewer better understands what is going on.h]hXYour patch will almost certainly get comments from reviewers on ways in which the patch can be improved, in the form of a reply to your email. You must respond to those comments; ignoring reviewers is a good way to get ignored in return. You can simply reply to their emails to answer their comments. Review comments or questions that do not lead to a code change should almost certainly bring about a comment or changelog entry so that the next reviewer better understands what is going on.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hj}hhubh)}(hX6Be sure to tell the reviewers what changes you are making and to thank them for their time. Code review is a tiring and time-consuming process, and reviewers sometimes get grumpy. Even in that case, though, respond politely and address the problems they have pointed out. When sending a next version, add a ``patch changelog`` to the cover letter or to individual patches explaining difference against previous submission (see :ref:`the_canonical_patch_format`). Notify people that commented on your patch about new versions by adding them to the patches CC list.h](hX6Be sure to tell the reviewers what changes you are making and to thank them for their time. Code review is a tiring and time-consuming process, and reviewers sometimes get grumpy. Even in that case, though, respond politely and address the problems they have pointed out. When sending a next version, add a }(hjhhhNhNubh)}(h``patch changelog``h]hpatch changelog}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhe to the cover letter or to individual patches explaining difference against previous submission (see }(hjhhhNhNubh)}(h!:ref:`the_canonical_patch_format`h]j$)}(hjh]hthe_canonical_patch_format}(hjhhhNhNubah}(h]h ](j/stdstd-refeh"]h$]h&]uh1j#hjubah}(h]h ]h"]h$]h&]refdocj< refdomainjreftyperef refexplicitrefwarnjBthe_canonical_patch_formatuh1hhhhMAhjubhg). Notify people that commented on your patch about new versions by adding them to the patches CC list.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMAhj}hhubh)}(hlSee Documentation/process/email-clients.rst for recommendations on email clients and mailing list etiquette.h]hlSee Documentation/process/email-clients.rst for recommendations on email clients and mailing list etiquette.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhj}hhubh)}(h.. _interleaved_replies:h]h}(h]h ]h"]h$]h&]hinterleaved-repliesuh1hhMNhj}hhhhubeh}(h]respond-to-review-commentsah ]h"]respond to review commentsah$]h&]uh1hhhhhhhhM7ubh)}(hhh](h)}(h4Use trimmed interleaved replies in email discussionsh]h4Use trimmed interleaved replies in email discussions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMQubh)}(hTop-posting is strongly discouraged in Linux kernel development discussions. Interleaved (or "inline") replies make conversations much easier to follow. For more details see: https://en.wikipedia.org/wiki/Posting_style#Interleaved_styleh](hTop-posting is strongly discouraged in Linux kernel development discussions. Interleaved (or “inline”) replies make conversations much easier to follow. For more details see: }(hjhhhNhNubj)}(h=https://en.wikipedia.org/wiki/Posting_style#Interleaved_styleh]h=https://en.wikipedia.org/wiki/Posting_style#Interleaved_style}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhMRhjhhubh)}(h-As is frequently quoted on the mailing list::h]h,As is frequently quoted on the mailing list:}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjhhubj)}(hXA: http://en.wikipedia.org/wiki/Top_post Q: Were do I find info about this thing called top-posting? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?h]hXA: http://en.wikipedia.org/wiki/Top_post Q: Were do I find info about this thing called top-posting? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?}hj=sbah}(h]h ]h"]h$]h&]jjuh1jhhhMYhjhhubh)}(hSimilarly, please trim all unneeded quotations that aren't relevant to your reply. This makes responses easier to find, and saves time and space. For more details see: http://daringfireball.net/2007/07/on_top ::h](hSimilarly, please trim all unneeded quotations that aren’t relevant to your reply. This makes responses easier to find, and saves time and space. For more details see: }(hjKhhhNhNubj)}(h(http://daringfireball.net/2007/07/on_toph]h(http://daringfireball.net/2007/07/on_top}(hjShhhNhNubah}(h]h ]h"]h$]h&]refurijUuh1jhjKubeh}(h]h ]h"]h$]h&]uh1hhhhM`hjhhubj)}(h5A: No. Q: Should I include quotations after my reply?h]h5A: No. Q: Should I include quotations after my reply?}hjhsbah}(h]h ]h"]h$]h&]jjuh1jhhhMdhjhhubh)}(h.. _resend_reminders:h]h}(h]h ]h"]h$]h&]hresend-remindersuh1hhMghjhhhhubeh}(h](4use-trimmed-interleaved-replies-in-email-discussionsjeh ]h"](4use trimmed interleaved replies in email discussionsinterleaved_replieseh$]h&]uh1hhhhhhhhMQj}jjsj}jjsubh)}(hhh](h)}(h$Don't get discouraged - or impatienth]h&Don’t get discouraged - or impatient}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMjubh)}(hAfter you have submitted your change, be patient and wait. Reviewers are busy people and may not get to your patch right away.h]hAfter you have submitted your change, be patient and wait. Reviewers are busy people and may not get to your patch right away.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhjhhubh)}(hXOnce upon a time, patches used to disappear into the void without comment, but the development process works more smoothly than that now. You should receive comments within a few weeks (typically 2-3); if that does not happen, make sure that you have sent your patches to the right place. Wait for a minimum of one week before resubmitting or pinging reviewers - possibly longer during busy times like merge windows.h]hXOnce upon a time, patches used to disappear into the void without comment, but the development process works more smoothly than that now. You should receive comments within a few weeks (typically 2-3); if that does not happen, make sure that you have sent your patches to the right place. Wait for a minimum of one week before resubmitting or pinging reviewers - possibly longer during busy times like merge windows.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjhhubh)}(hIt's also ok to resend the patch or the patch series after a couple of weeks with the word "RESEND" added to the subject line::h]hIt’s also ok to resend the patch or the patch series after a couple of weeks with the word “RESEND” added to the subject line:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjhhubj)}(h2[PATCH Vx RESEND] sub/sys: Condensed patch summaryh]h2[PATCH Vx RESEND] sub/sys: Condensed patch summary}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMyhjhhubh)}(hDon't add "RESEND" when you are submitting a modified version of your patch or patch series - "RESEND" only applies to resubmission of a patch or patch series which have not been modified in any way from the previous submission.h]hDon’t add “RESEND” when you are submitting a modified version of your patch or patch series - “RESEND” only applies to resubmission of a patch or patch series which have not been modified in any way from the previous submission.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hjhhubeh}(h]("don-t-get-discouraged-or-impatientjeh ]h"]($don't get discouraged - or impatientresend_reminderseh$]h&]uh1hhhhhhhhMjj}jjvsj}jjvsubh)}(hhh](h)}(hInclude PATCH in the subjecth]hInclude PATCH in the subject}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hDue to high e-mail traffic to Linus, and to linux-kernel, it is common convention to prefix your subject line with [PATCH]. This lets Linus and other kernel developers more easily distinguish patches from other e-mail discussions.h]hDue to high e-mail traffic to Linus, and to linux-kernel, it is common convention to prefix your subject line with [PATCH]. This lets Linus and other kernel developers more easily distinguish patches from other e-mail discussions.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h6``git send-email`` will do this for you automatically.h](h)}(h``git send-email``h]hgit send-email}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh$ will do this for you automatically.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]include-patch-in-the-subjectah ]h"]include patch in the subjectah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h6Sign your work - the Developer's Certificate of Originh]h8Sign your work - the Developer’s Certificate of Origin}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1 hhhhhMubh)}(hTo improve tracking of who did what, especially with patches that can percolate to their final resting place in the kernel through several layers of maintainers, we've introduced a "sign-off" procedure on patches that are being emailed around.h]hTo improve tracking of who did what, especially with patches that can percolate to their final resting place in the kernel through several layers of maintainers, we’ve introduced a “sign-off” procedure on patches that are being emailed around.}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1 hhubh)}(hThe sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below:h]hThe sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below:}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1 hhubh)}(hhh](h)}(h%Developer's Certificate of Origin 1.1h]h'Developer’s Certificate of Origin 1.1}(hja hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^ hhhhhMubh)}(h9By making a contribution to this project, I certify that:h]h9By making a contribution to this project, I certify that:}(hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj^ hhubh block_quote)}(hX (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. h]henumerated_list)}(hhh](j*)}(hThe contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or h]h)}(hThe contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; orh]hThe contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j)hj ubj*)}(hX|The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or h]h)}(hX{The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; orh]hX{The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j)hj ubj*)}(h|The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. h]h)}(h{The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.h]h{The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j)hj ubj*)}(hX5I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. h]h)}(hX4I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.h]hX4I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j)hj ubeh}(h]h ]h"]h$]h&]enumtype loweralphaprefix(suffix)uh1j hj ubah}(h]h ]h"]h$]h&]uh1j} hhhMhj^ hhubh)}(h!then you just add a line saying::h]h then you just add a line saying:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj^ hhubj)}(h@Signed-off-by: Random J Developer h]h@Signed-off-by: Random J Developer }hj sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj^ hhubh)}(husing a known identity (sorry, no anonymous contributions.) This will be done for you automatically if you use ``git commit -s``. Reverts should also include "Signed-off-by". ``git revert -s`` does that for you.h](housing a known identity (sorry, no anonymous contributions.) This will be done for you automatically if you use }(hj hhhNhNubh)}(h``git commit -s``h]h git commit -s}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh3. Reverts should also include “Signed-off-by”. }(hj hhhNhNubh)}(h``git revert -s``h]h git revert -s}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh does that for you.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj^ hhubh)}(hSome people also put extra tags at the end. They'll just be ignored for now, but you can do this to mark internal company procedures or just point out some special detail about the sign-off.h]hSome people also put extra tags at the end. They’ll just be ignored for now, but you can do this to mark internal company procedures or just point out some special detail about the sign-off.}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj^ hhubh)}(hXcAny further SoBs (Signed-off-by:'s) following the author's SoB are from people handling and transporting the patch, but were not involved in its development. SoB chains should reflect the **real** route a patch took as it was propagated to the maintainers and ultimately to Linus, with the first SoB entry signalling primary authorship of a single author.h](hAny further SoBs (Signed-off-by:’s) following the author’s SoB are from people handling and transporting the patch, but were not involved in its development. SoB chains should reflect the }(hjV hhhNhNubj)}(h**real**h]hreal}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjV ubh route a patch took as it was propagated to the maintainers and ultimately to Linus, with the first SoB entry signalling primary authorship of a single author.}(hjV hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj^ hhubeh}(h]%developer-s-certificate-of-origin-1-1ah ]h"]%developer's certificate of origin 1.1ah$]h&]uh1hhj1 hhhhhMubeh}(h]4sign-your-work-the-developer-s-certificate-of-originah ]h"]6sign your work - the developer's certificate of originah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h0When to use Acked-by:, Cc:, and Co-developed-by:h]h0When to use Acked-by:, Cc:, and Co-developed-by:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hThe Signed-off-by: tag indicates that the signer was involved in the development of the patch, or that he/she was in the patch's delivery path.h]hThe Signed-off-by: tag indicates that the signer was involved in the development of the patch, or that he/she was in the patch’s delivery path.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hIf a person was not directly involved in the preparation or handling of a patch but wishes to signify and record their approval of it then they can ask to have an Acked-by: line added to the patch's changelog.h]hIf a person was not directly involved in the preparation or handling of a patch but wishes to signify and record their approval of it then they can ask to have an Acked-by: line added to the patch’s changelog.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hAcked-by: is meant to be used by those responsible for or involved with the affected code in one way or another. Most commonly, the maintainer when that maintainer neither contributed to nor forwarded the patch.h]hAcked-by: is meant to be used by those responsible for or involved with the affected code in one way or another. Most commonly, the maintainer when that maintainer neither contributed to nor forwarded the patch.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hX4Acked-by: may also be used by other stakeholders, such as people with domain knowledge (e.g. the original author of the code being modified), userspace-side reviewers for a kernel uAPI patch or key users of a feature. Optionally, in these cases, it can be useful to add a "# Suffix" to clarify its meaning::h]hX7Acked-by: may also be used by other stakeholders, such as people with domain knowledge (e.g. the original author of the code being modified), userspace-side reviewers for a kernel uAPI patch or key users of a feature. Optionally, in these cases, it can be useful to add a “# Suffix” to clarify its meaning:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj)}(hEAcked-by: The Stakeholder # As primary userh]hEAcked-by: The Stakeholder # As primary user}hj sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj hhubh)}(hX5Acked-by: is not as formal as Signed-off-by:. It is a record that the acker has at least reviewed the patch and has indicated acceptance. Hence patch mergers will sometimes manually convert an acker's "yep, looks good to me" into an Acked-by: (but note that it is usually better to ask for an explicit ack).h]hX;Acked-by: is not as formal as Signed-off-by:. It is a record that the acker has at least reviewed the patch and has indicated acceptance. Hence patch mergers will sometimes manually convert an acker’s “yep, looks good to me” into an Acked-by: (but note that it is usually better to ask for an explicit ack). }(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXAcked-by: is also less formal than Reviewed-by:. For instance, maintainers may use it to signify that they are OK with a patch landing, but they may not have reviewed it as thoroughly as if a Reviewed-by: was provided. Similarly, a key user may not have carried out a technical review of the patch, yet they may be satisfied with the general approach, the feature or the user-facing interface.h]hXAcked-by: is also less formal than Reviewed-by:. For instance, maintainers may use it to signify that they are OK with a patch landing, but they may not have reviewed it as thoroughly as if a Reviewed-by: was provided. Similarly, a key user may not have carried out a technical review of the patch, yet they may be satisfied with the general approach, the feature or the user-facing interface.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXAcked-by: does not necessarily indicate acknowledgement of the entire patch. For example, if a patch affects multiple subsystems and has an Acked-by: from one subsystem maintainer then this usually indicates acknowledgement of just the part which affects that maintainer's code. Judgement should be used here. When in doubt people should refer to the original discussion in the mailing list archives. A "# Suffix" may also be used in this case to clarify.h]hXAcked-by: does not necessarily indicate acknowledgement of the entire patch. For example, if a patch affects multiple subsystems and has an Acked-by: from one subsystem maintainer then this usually indicates acknowledgement of just the part which affects that maintainer’s code. Judgement should be used here. When in doubt people should refer to the original discussion in the mailing list archives. A “# Suffix” may also be used in this case to clarify.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXIf a person has had the opportunity to comment on a patch, but has not provided such comments, you may optionally add a ``Cc:`` tag to the patch. This tag documents that potentially interested parties have been included in the discussion. Note, this is one of only three tags you might be able to use without explicit permission of the person named (see 'Tagging people requires permission' below for details).h](hxIf a person has had the opportunity to comment on a patch, but has not provided such comments, you may optionally add a }(hj hhhNhNubh)}(h``Cc:``h]hCc:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubhX tag to the patch. This tag documents that potentially interested parties have been included in the discussion. Note, this is one of only three tags you might be able to use without explicit permission of the person named (see ‘Tagging people requires permission’ below for details).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXCo-developed-by: states that the patch was co-created by multiple developers; it is used to give attribution to co-authors (in addition to the author attributed by the From: tag) when several people work on a single patch. Since Co-developed-by: denotes authorship, every Co-developed-by: must be immediately followed by a Signed-off-by: of the associated co-author. Standard sign-off procedure applies, i.e. the ordering of Signed-off-by: tags should reflect the chronological history of the patch insofar as possible, regardless of whether the author is attributed via From: or Co-developed-by:. Notably, the last Signed-off-by: must always be that of the developer submitting the patch.h]hXCo-developed-by: states that the patch was co-created by multiple developers; it is used to give attribution to co-authors (in addition to the author attributed by the From: tag) when several people work on a single patch. Since Co-developed-by: denotes authorship, every Co-developed-by: must be immediately followed by a Signed-off-by: of the associated co-author. Standard sign-off procedure applies, i.e. the ordering of Signed-off-by: tags should reflect the chronological history of the patch insofar as possible, regardless of whether the author is attributed via From: or Co-developed-by:. Notably, the last Signed-off-by: must always be that of the developer submitting the patch.}(hj' hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hNote, the From: tag is optional when the From: author is also the person (and email) listed in the From: line of the email header.h]hNote, the From: tag is optional when the From: author is also the person (and email) listed in the From: line of the email header.}(hj5 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(h2Example of a patch submitted by the From: author::h]h1Example of a patch submitted by the From: author:}(hjC hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj)}(hX9 Co-developed-by: First Co-Author Signed-off-by: First Co-Author Co-developed-by: Second Co-Author Signed-off-by: Second Co-Author Signed-off-by: From Author h]hX9 Co-developed-by: First Co-Author Signed-off-by: First Co-Author Co-developed-by: Second Co-Author Signed-off-by: Second Co-Author Signed-off-by: From Author }hjQ sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj hhubh)}(h;Example of a patch submitted by a Co-developed-by: author::h]h:Example of a patch submitted by a Co-developed-by: author:}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj)}(hXlFrom: From Author Co-developed-by: Random Co-Author Signed-off-by: Random Co-Author Signed-off-by: From Author Co-developed-by: Submitting Co-Author Signed-off-by: Submitting Co-Author h]hXlFrom: From Author Co-developed-by: Random Co-Author Signed-off-by: Random Co-Author Signed-off-by: From Author Co-developed-by: Submitting Co-Author Signed-off-by: Submitting Co-Author }hjm sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj hhubeh}(h]+when-to-use-acked-by-cc-and-co-developed-byah ]h"]0when to use acked-by:, cc:, and co-developed-by:ah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hFUsing Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: and Fixes:h]hFUsing Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: and Fixes:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hXkThe Reported-by tag gives credit to people who find bugs and report them and it hopefully inspires them to help us again in the future. The tag is intended for bugs; please do not use it to credit feature requests. The tag should be followed by a Closes: tag pointing to the report, unless the report is not available on the web. The Link: tag can be used instead of Closes: if the patch fixes a part of the issue(s) being reported. Note, the Reported-by tag is one of only three tags you might be able to use without explicit permission of the person named (see 'Tagging people requires permission' below for details).h]hXoThe Reported-by tag gives credit to people who find bugs and report them and it hopefully inspires them to help us again in the future. The tag is intended for bugs; please do not use it to credit feature requests. The tag should be followed by a Closes: tag pointing to the report, unless the report is not available on the web. The Link: tag can be used instead of Closes: if the patch fixes a part of the issue(s) being reported. Note, the Reported-by tag is one of only three tags you might be able to use without explicit permission of the person named (see ‘Tagging people requires permission’ below for details).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXA Tested-by: tag indicates that the patch has been successfully tested (in some environment) by the person named. This tag informs maintainers that some testing has been performed, provides a means to locate testers for future patches, and ensures credit for the testers.h]hXA Tested-by: tag indicates that the patch has been successfully tested (in some environment) by the person named. This tag informs maintainers that some testing has been performed, provides a means to locate testers for future patches, and ensures credit for the testers.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj hhubh)}(h}Reviewed-by:, instead, indicates that the patch has been reviewed and found acceptable according to the Reviewer's Statement:h]hReviewed-by:, instead, indicates that the patch has been reviewed and found acceptable according to the Reviewer’s Statement:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hj hhubh)}(hhh](h)}(h!Reviewer's statement of oversighth]h#Reviewer’s statement of oversight}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM0ubh)}(h.By offering my Reviewed-by: tag, I state that:h]h.By offering my Reviewed-by: tag, I state that:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hj hhubj~ )}(hX+(a) I have carried out a technical review of this patch to evaluate its appropriateness and readiness for inclusion into the mainline kernel. (b) Any problems, concerns, or questions relating to the patch have been communicated back to the submitter. I am satisfied with the submitter's response to my comments. (c) While there may be things that could be improved with this submission, I believe that it is, at this time, (1) a worthwhile modification to the kernel, and (2) free of known issues which would argue against its inclusion. (d) While I have reviewed the patch and believe it to be sound, I do not (unless explicitly stated elsewhere) make any warranties or guarantees that it will achieve its stated purpose or function properly in any given situation. h]j )}(hhh](j*)}(hI have carried out a technical review of this patch to evaluate its appropriateness and readiness for inclusion into the mainline kernel. h]h)}(hI have carried out a technical review of this patch to evaluate its appropriateness and readiness for inclusion into the mainline kernel.h]hI have carried out a technical review of this patch to evaluate its appropriateness and readiness for inclusion into the mainline kernel.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hj ubah}(h]h ]h"]h$]h&]uh1j)hj ubj*)}(hAny problems, concerns, or questions relating to the patch have been communicated back to the submitter. I am satisfied with the submitter's response to my comments. h]h)}(hAny problems, concerns, or questions relating to the patch have been communicated back to the submitter. I am satisfied with the submitter's response to my comments.h]hAny problems, concerns, or questions relating to the patch have been communicated back to the submitter. I am satisfied with the submitter’s response to my comments.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hj ubah}(h]h ]h"]h$]h&]uh1j)hj ubj*)}(hWhile there may be things that could be improved with this submission, I believe that it is, at this time, (1) a worthwhile modification to the kernel, and (2) free of known issues which would argue against its inclusion. h]h)}(hWhile there may be things that could be improved with this submission, I believe that it is, at this time, (1) a worthwhile modification to the kernel, and (2) free of known issues which would argue against its inclusion.h]hWhile there may be things that could be improved with this submission, I believe that it is, at this time, (1) a worthwhile modification to the kernel, and (2) free of known issues which would argue against its inclusion.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hj ubah}(h]h ]h"]h$]h&]uh1j)hj ubj*)}(hWhile I have reviewed the patch and believe it to be sound, I do not (unless explicitly stated elsewhere) make any warranties or guarantees that it will achieve its stated purpose or function properly in any given situation. h]h)}(hWhile I have reviewed the patch and believe it to be sound, I do not (unless explicitly stated elsewhere) make any warranties or guarantees that it will achieve its stated purpose or function properly in any given situation.h]hWhile I have reviewed the patch and believe it to be sound, I do not (unless explicitly stated elsewhere) make any warranties or guarantees that it will achieve its stated purpose or function properly in any given situation.}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhj, ubah}(h]h ]h"]h$]h&]uh1j)hj ubeh}(h]h ]h"]h$]h&]j j j j j j uh1j hj ubah}(h]h ]h"]h$]h&]uh1j} hhhM4hj hhubh)}(hX4A Reviewed-by tag is a statement of opinion that the patch is an appropriate modification of the kernel without any remaining serious technical issues. Any interested reviewer (who has done the work) can offer a Reviewed-by tag for a patch. This tag serves to give credit to reviewers and to inform maintainers of the degree of review which has been done on the patch. Reviewed-by: tags, when supplied by reviewers known to understand the subject area and to perform thorough reviews, will normally increase the likelihood of your patch getting into the kernel.h]hX4A Reviewed-by tag is a statement of opinion that the patch is an appropriate modification of the kernel without any remaining serious technical issues. Any interested reviewer (who has done the work) can offer a Reviewed-by tag for a patch. This tag serves to give credit to reviewers and to inform maintainers of the degree of review which has been done on the patch. Reviewed-by: tags, when supplied by reviewers known to understand the subject area and to perform thorough reviews, will normally increase the likelihood of your patch getting into the kernel.}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhj hhubh)}(hXBoth Tested-by and Reviewed-by tags, once received on mailing list from tester or reviewer, should be added by author to the applicable patches when sending next versions. However if the patch has changed substantially in following version, these tags might not be applicable anymore and thus should be removed. Usually removal of someone's Tested-by or Reviewed-by tags should be mentioned in the patch changelog (after the '---' separator).h]hXBoth Tested-by and Reviewed-by tags, once received on mailing list from tester or reviewer, should be added by author to the applicable patches when sending next versions. However if the patch has changed substantially in following version, these tags might not be applicable anymore and thus should be removed. Usually removal of someone’s Tested-by or Reviewed-by tags should be mentioned in the patch changelog (after the ‘---’ separator).}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhj hhubh)}(hXA Suggested-by: tag indicates that the patch idea is suggested by the person named and ensures credit to the person for the idea: if we diligently credit our idea reporters, they will, hopefully, be inspired to help us again in the future. Note, this is one of only three tags you might be able to use without explicit permission of the person named (see 'Tagging people requires permission' below for details).h]hXA Suggested-by: tag indicates that the patch idea is suggested by the person named and ensures credit to the person for the idea: if we diligently credit our idea reporters, they will, hopefully, be inspired to help us again in the future. Note, this is one of only three tags you might be able to use without explicit permission of the person named (see ‘Tagging people requires permission’ below for details).}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhj hhubh)}(hXA Fixes: tag indicates that the patch fixes an issue in a previous commit. It is used to make it easy to determine where a bug originated, which can help review a bug fix. This tag also assists the stable kernel team in determining which stable kernel versions should receive your fix. This is the preferred method for indicating a bug fixed by the patch. See :ref:`describe_changes` for more details.h](hXhA Fixes: tag indicates that the patch fixes an issue in a previous commit. It is used to make it easy to determine where a bug originated, which can help review a bug fix. This tag also assists the stable kernel team in determining which stable kernel versions should receive your fix. This is the preferred method for indicating a bug fixed by the patch. See }(hjz hhhNhNubh)}(h:ref:`describe_changes`h]j$)}(hj h]hdescribe_changes}(hj hhhNhNubah}(h]h ](j/stdstd-refeh"]h$]h&]uh1j#hj ubah}(h]h ]h"]h$]h&]refdocj< refdomainj reftyperef refexplicitrefwarnjBdescribe_changesuh1hhhhM]hjz ubh for more details.}(hjz hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM]hj hhubh)}(hNote: Attaching a Fixes: tag does not subvert the stable kernel rules process nor the requirement to Cc: stable@vger.kernel.org on all stable patch candidates. For more information, please read Documentation/process/stable-kernel-rules.rst.h](hiNote: Attaching a Fixes: tag does not subvert the stable kernel rules process nor the requirement to Cc: }(hj hhhNhNubj)}(hstable@vger.kernel.orgh]hstable@vger.kernel.org}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:stable@vger.kernel.orguh1jhj ubhq on all stable patch candidates. For more information, please read Documentation/process/stable-kernel-rules.rst.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMdhj hhubh)}(hFinally, while providing tags is welcome and typically very appreciated, please note that signers (i.e. submitters and maintainers) may use their discretion in applying offered tags.h]hFinally, while providing tags is welcome and typically very appreciated, please note that signers (i.e. submitters and maintainers) may use their discretion in applying offered tags.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMihj hhubh)}(h.. _tagging_people:h]h}(h]h ]h"]h$]h&]htagging-peopleuh1hhMmhj hhhhubeh}(h]!reviewer-s-statement-of-oversightah ]h"]!reviewer's statement of oversightah$]h&]uh1hhj hhhhhM0ubeh}(h]>using-reported-by-tested-by-reviewed-by-suggested-by-and-fixesah ]h"]Fusing reported-by:, tested-by:, reviewed-by:, suggested-by: and fixes:ah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h"Tagging people requires permissionh]h"Tagging people requires permission}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMpubh)}(hXzBe careful in the addition of the aforementioned tags to your patches, as all except for Cc:, Reported-by:, and Suggested-by: need explicit permission of the person named. For those three implicit permission is sufficient if the person contributed to the Linux kernel using that name and email address according to the lore archives or the commit history -- and in case of Reported-by: and Suggested-by: did the reporting or suggestion in public. Note, bugzilla.kernel.org is a public place in this sense, but email addresses used there are private; so do not expose them in tags, unless the person used them in earlier contributions.h]hXzBe careful in the addition of the aforementioned tags to your patches, as all except for Cc:, Reported-by:, and Suggested-by: need explicit permission of the person named. For those three implicit permission is sufficient if the person contributed to the Linux kernel using that name and email address according to the lore archives or the commit history -- and in case of Reported-by: and Suggested-by: did the reporting or suggestion in public. Note, bugzilla.kernel.org is a public place in this sense, but email addresses used there are private; so do not expose them in tags, unless the person used them in earlier contributions.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhj hhubh)}(h.. _the_canonical_patch_format:h]h}(h]h ]h"]h$]h&]hthe-canonical-patch-formatuh1hhM|hj hhhhubeh}(h]("tagging-people-requires-permissionj eh ]h"]("tagging people requires permissiontagging_peopleeh$]h&]uh1hhhhhhhhMpj}j' j sj}j j subh)}(hhh](h)}(hThe canonical patch formath]hThe canonical patch format}(hj/ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj, hhhhhMubh)}(hXThis section describes how the patch itself should be formatted. Note 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.h](hrThis section describes how the patch itself should be formatted. Note that, if you have your patches stored in a }(hj= hhhNhNubh)}(h``git``h]hgit}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj= ubh5 repository, proper patch formatting can be had with }(hj= hhhNhNubh)}(h``git format-patch``h]hgit format-patch}(hjW hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj= ubh]. The tools cannot create the necessary text, though, so read the instructions below anyway.}(hj= hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj, hhubh)}(hhh](h)}(h Subject Lineh]h Subject Line}(hjr hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjo hhhhhMubh)}(h%The canonical patch subject line is::h]h$The canonical patch subject line is:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjo hhubj)}(h2Subject: [PATCH 001/123] subsystem: summary phraseh]h2Subject: [PATCH 001/123] subsystem: summary phrase}hj sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjo hhubh)}(h8The canonical patch message body contains the following:h]h8The canonical patch message body contains the following:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjo hhubj~ )}(hX - A ``from`` line specifying the patch author, followed by an empty line (only needed if the person sending the patch is not the author). - The body of the explanation, line wrapped at 75 columns, which will be copied to the permanent changelog to describe this patch. - An empty line. - The ``Signed-off-by:`` lines, described above, which will also go in the changelog. - A marker line containing simply ``---``. - Any additional comments not suitable for the changelog. - The actual patch (``diff`` output). h]j%)}(hhh](j*)}(hA ``from`` line specifying the patch author, followed by an empty line (only needed if the person sending the patch is not the author). h]h)}(hA ``from`` line specifying the patch author, followed by an empty line (only needed if the person sending the patch is not the author).h](hA }(hj hhhNhNubh)}(h``from``h]hfrom}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh} line specifying the patch author, followed by an empty line (only needed if the person sending the patch is not the author).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j)hj ubj*)}(hThe body of the explanation, line wrapped at 75 columns, which will be copied to the permanent changelog to describe this patch. h]h)}(hThe body of the explanation, line wrapped at 75 columns, which will be copied to the permanent changelog to describe this patch.h]hThe body of the explanation, line wrapped at 75 columns, which will be copied to the permanent changelog to describe this patch.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j)hj ubj*)}(hAn empty line. h]h)}(hAn empty line.h]hAn empty line.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j)hj ubj*)}(hTThe ``Signed-off-by:`` lines, described above, which will also go in the changelog. h]h)}(hSThe ``Signed-off-by:`` lines, described above, which will also go in the changelog.h](hThe }(hjhhhNhNubh)}(h``Signed-off-by:``h]hSigned-off-by:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh= lines, described above, which will also go in the changelog.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j)hj ubj*)}(h)A marker line containing simply ``---``. h]h)}(h(A marker line containing simply ``---``.h](h A marker line containing simply }(hj9hhhNhNubh)}(h``---``h]h---}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9ubh.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj5ubah}(h]h ]h"]h$]h&]uh1j)hj ubj*)}(h8Any additional comments not suitable for the changelog. h]h)}(h7Any additional comments not suitable for the changelog.h]h7Any additional comments not suitable for the changelog.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ubah}(h]h ]h"]h$]h&]uh1j)hj ubj*)}(h$The actual patch (``diff`` output). h]h)}(h#The actual patch (``diff`` output).h](hThe actual patch (}(hj{hhhNhNubh)}(h``diff``h]hdiff}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{ubh output).}(hj{hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjwubah}(h]h ]h"]h$]h&]uh1j)hj ubeh}(h]h ]h"]h$]h&]jwjxuh1j$hhhMhj ubah}(h]h ]h"]h$]h&]uh1j} hhhMhjo hhubh)}(hThe Subject line format makes it very easy to sort the emails alphabetically by subject line - pretty much any email reader will support that - since because the sequence number is zero-padded, the numerical and alphabetic sort is the same.h]hThe Subject line format makes it very easy to sort the emails alphabetically by subject line - pretty much any email reader will support that - since because the sequence number is zero-padded, the numerical and alphabetic sort is the same.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjo hhubh)}(hpThe ``subsystem`` in the email's Subject should identify which area or subsystem of the kernel is being patched.h](hThe }(hjhhhNhNubh)}(h ``subsystem``h]h subsystem}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubha in the email’s Subject should identify which area or subsystem of the kernel is being patched.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjo hhubh)}(hX>The ``summary phrase`` in the email's Subject should concisely describe the patch which that email contains. The ``summary phrase`` should not be a filename. Do not use the same ``summary phrase`` for every patch in a whole patch series (where a ``patch series`` is an ordered sequence of multiple, related patches).h](hThe }(hjhhhNhNubh)}(h``summary phrase``h]hsummary phrase}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh^ in the email’s Subject should concisely describe the patch which that email contains. The }(hjhhhNhNubh)}(h``summary phrase``h]hsummary phrase}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh0 should not be a filename. Do not use the same }(hjhhhNhNubh)}(h``summary phrase``h]hsummary phrase}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh2 for every patch in a whole patch series (where a }(hjhhhNhNubh)}(h``patch series``h]h patch series}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh6 is an ordered sequence of multiple, related patches).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjo hhubh)}(hX'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 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``.h](hBear in mind that the }(hj1hhhNhNubh)}(h``summary phrase``h]hsummary phrase}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1ubhh of your email becomes a globally-unique identifier for that patch. It propagates all the way into the }(hj1hhhNhNubh)}(h``git``h]hgit}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1ubh changelog. The }(hj1hhhNhNubh)}(h``summary phrase``h]hsummary phrase}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1ubhj may later be used in developer discussions which refer to the patch. People will want to google for the }(hj1hhhNhNubh)}(h``summary phrase``h]hsummary phrase}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1ubh 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 }(hj1hhhNhNubh)}(h``gitk``h]hgitk}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1ubh or }(hj1hhhNhNubh)}(h``git log --oneline``h]hgit log --oneline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1ubh.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjo hhubh)}(hXFor these reasons, the ``summary`` must be no more than 70-75 characters, and it must describe both what the patch changes, as well as why the patch might be necessary. It is challenging to be both succinct and descriptive, but that is what a well-written summary should do.h](hFor these reasons, the }(hjhhhNhNubh)}(h ``summary``h]hsummary}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh must be no more than 70-75 characters, and it must describe both what the patch changes, as well as why the patch might be necessary. It is challenging to be both succinct and descriptive, but that is what a well-written summary should do.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjo hhubh)}(hXThe ``summary phrase`` may be prefixed by tags enclosed in square brackets: "Subject: [PATCH ...] ". The tags are not considered part of the summary phrase, but describe how the patch should be treated. Common tags might include a version descriptor if the multiple versions of the patch have been sent out in response to comments (i.e., "v1, v2, v3"), or "RFC" to indicate a request for comments.h](hThe }(hjhhhNhNubh)}(h``summary phrase``h]hsummary phrase}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhX may be prefixed by tags enclosed in square brackets: “Subject: [PATCH ...] ”. The tags are not considered part of the summary phrase, but describe how the patch should be treated. Common tags might include a version descriptor if the multiple versions of the patch have been sent out in response to comments (i.e., “v1, v2, v3”), or “RFC” to indicate a request for comments.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjo hhubh)}(hXIf there are four patches in a patch series the individual patches may be numbered like this: 1/4, 2/4, 3/4, 4/4. This assures that developers understand the order in which the patches should be applied and that they have reviewed or applied all of the patches in the patch series.h]hXIf there are four patches in a patch series the individual patches may be numbered like this: 1/4, 2/4, 3/4, 4/4. This assures that developers understand the order in which the patches should be applied and that they have reviewed or applied all of the patches in the patch series.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjo hhubh)}(h%Here are some good example Subjects::h]h$Here are some good example Subjects:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjo hhubj)}(hSubject: [PATCH 2/5] ext2: improve scalability of bitmap searching Subject: [PATCH v2 01/27] x86: fix eflags tracking Subject: [PATCH v2] sub/sys: Condensed patch summary Subject: [PATCH v2 M/N] sub/sys: Condensed patch summaryh]hSubject: [PATCH 2/5] ext2: improve scalability of bitmap searching Subject: [PATCH v2 01/27] x86: fix eflags tracking Subject: [PATCH v2] sub/sys: Condensed patch summary Subject: [PATCH v2 M/N] sub/sys: Condensed patch summary}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjo hhubeh}(h] subject-lineah ]h"] subject lineah$]h&]uh1hhj, hhhhhMubh)}(hhh](h)}(h From Lineh]h From Line}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hTThe ``from`` line must be the very first line in the message body, and has the form:h](hThe }(hj.hhhNhNubh)}(h``from``h]hfrom}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.ubhH line must be the very first line in the message body, and has the form:}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj~ )}(h(From: Patch Author h]h)}(h'From: Patch Author h](hFrom: Patch Author <}(hjRhhhNhNubj)}(hauthor@example.comh]hauthor@example.com}(hjZhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:author@example.comuh1jhjRubh>}(hjRhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjNubah}(h]h ]h"]h$]h&]uh1j} hhhMhjhhubh)}(hThe ``from`` line specifies who will be credited as the author of the patch in the permanent changelog. If the ``from`` line is missing, then the ``From:`` line from the email header will be used to determine the patch author in the changelog.h](hThe }(hjzhhhNhNubh)}(h``from``h]hfrom}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzubhd line specifies who will be credited as the author of the patch in the permanent changelog. If the }(hjzhhhNhNubh)}(h``from``h]hfrom}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzubh line is missing, then the }(hjzhhhNhNubh)}(h ``From:``h]hFrom:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzubhX line from the email header will be used to determine the patch author in the changelog.}(hjzhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThe author may indicate their affiliation or the sponsor of the work by adding the name of an organization to the ``from`` and ``SoB`` lines, e.g.:h](hrThe author may indicate their affiliation or the sponsor of the work by adding the name of an organization to the }(hjhhhNhNubh)}(h``from``h]hfrom}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh and }(hjhhhNhNubh)}(h``SoB``h]hSoB}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh lines, e.g.:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj~ )}(h2From: Patch Author (Company) h]h)}(h1From: Patch Author (Company) h](hFrom: Patch Author (Company) <}(hjhhhNhNubj)}(hauthor@example.comh]hauthor@example.com}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:author@example.comuh1jhjubh>}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j} hhhMhjhhubeh}(h] from-lineah ]h"] from lineah$]h&]uh1hhj, hhhhhMubh)}(hhh](h)}(hExplanation Bodyh]hExplanation Body}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hhhhhMubh)}(hXpThe explanation body will be committed to the permanent source changelog, so should make sense to a competent reader who has long since forgotten the immediate details of the discussion that might have led to this patch. Including symptoms of the failure which the patch addresses (kernel log messages, oops messages, etc.) are especially useful for people who might be searching the commit logs looking for the applicable patch. The text should be written in such detail so that when read weeks, months or even years later, it can give the reader the needed details to grasp the reasoning for **why** the patch was created.h](hXRThe explanation body will be committed to the permanent source changelog, so should make sense to a competent reader who has long since forgotten the immediate details of the discussion that might have led to this patch. Including symptoms of the failure which the patch addresses (kernel log messages, oops messages, etc.) are especially useful for people who might be searching the commit logs looking for the applicable patch. The text should be written in such detail so that when read weeks, months or even years later, it can give the reader the needed details to grasp the reasoning for }(hj5hhhNhNubj)}(h**why**h]hwhy}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubh the patch was created.}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj$hhubh)}(hXIf a patch fixes a compile failure, it may not be necessary to include _all_ of the compile failures; just enough that it is likely that someone searching for the patch can find it. As in the ``summary phrase``, it is important to be both succinct as well as descriptive.h](hIf a patch fixes a compile failure, it may not be necessary to include _all_ of the compile failures; just enough that it is likely that someone searching for the patch can find it. As in the }(hjUhhhNhNubh)}(h``summary phrase``h]hsummary phrase}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUubh=, it is important to be both succinct as well as descriptive.}(hjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj$hhubh)}(h.. _backtraces:h]h}(h]h ]h"]h$]h&]h backtracesuh1hhMhj$hhhhubh)}(hhh](h)}(hBacktraces in commit messagesh]hBacktraces in commit messages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hX)Backtraces help document the call chain leading to a problem. However, not all backtraces are helpful. For example, early boot call chains are unique and obvious. Copying the full dmesg output verbatim, however, adds distracting information like timestamps, module lists, register and stack dumps.h]hX)Backtraces help document the call chain leading to a problem. However, not all backtraces are helpful. For example, early boot call chains are unique and obvious. Copying the full dmesg output verbatim, however, adds distracting information like timestamps, module lists, register and stack dumps.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hTherefore, the most useful backtraces should distill the relevant information from the dump, which makes it easier to focus on the real issue. Here is an example of a well-trimmed backtrace::h]hTherefore, the most useful backtraces should distill the relevant information from the dump, which makes it easier to focus on the real issue. Here is an example of a well-trimmed backtrace:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(hunchecked MSR access error: WRMSR to 0xd51 (tried to write 0x0000000000000064) at rIP: 0xffffffffae059994 (native_write_msr+0x4/0x20) Call Trace: mba_wrmsr update_domains rdtgroup_mkdirh]hunchecked MSR access error: WRMSR to 0xd51 (tried to write 0x0000000000000064) at rIP: 0xffffffffae059994 (native_write_msr+0x4/0x20) Call Trace: mba_wrmsr update_domains rdtgroup_mkdir}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjhhubeh}(h](backtraces-in-commit-messagesjeh ]h"](backtraces in commit messages backtraceseh$]h&]uh1hhj$hhhhhMj}jjusj}jjusubeh}(h]explanation-bodyah ]h"]explanation bodyah$]h&]uh1hhj, hhhhhMubh)}(hhh](h)}(h Commentaryh]h Commentary}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hzThe ``---`` marker line serves the essential purpose of marking for patch handling tools where the changelog message ends.h](hThe }(hjhhhNhNubh)}(h``---``h]h---}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubho marker line serves the essential purpose of marking for patch handling tools where the changelog message ends.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX6One 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 on bigger patches. 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`` generates appropriate diffstats by default.)h](h3One good use for the additional comments after the }(hjhhhNhNubh)}(h``---``h]h---}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh marker is for a }(hjhhhNhNubh)}(h ``diffstat``h]hdiffstat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh\, to show what files have changed, and the number of inserted and deleted lines per file. A }(hjhhhNhNubh)}(h ``diffstat``h]hdiffstat}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhG is especially useful on bigger patches. If you are going to include a }(hjhhhNhNubh)}(h ``diffstat``h]hdiffstat}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh after the }(hjhhhNhNubh)}(h``---``h]h---}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh marker, please use }(hjhhhNhNubh)}(h ``diffstat``h]hdiffstat}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh options }(hjhhhNhNubh)}(h``-p 1 -w 70``h]h -p 1 -w 70}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh 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). (}(hjhhhNhNubh)}(h``git``h]hgit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh- generates appropriate diffstats by default.)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXOther 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.h](hOther 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 }(hjhhhNhNubh)}(h``patch changelogs``h]hpatch changelogs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhL which describe what has changed between the v1 and v2 version of the patch.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXPlease put this information **after** the ``---`` line which separates the changelog from the rest of the patch. The version information is not part of the changelog which gets committed to the git tree. It is additional information for the reviewers. If it's placed above the commit tags, it needs manual interaction to remove it. If it is below the separator line, it gets automatically stripped off when applying the patch::h](hPlease put this information }(hjhhhNhNubj)}(h **after**h]hafter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh the }(hjhhhNhNubh)}(h``---``h]h---}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhX{ line which separates the changelog from the rest of the patch. The version information is not part of the changelog which gets committed to the git tree. It is additional information for the reviewers. If it’s placed above the commit tags, it needs manual interaction to remove it. If it is below the separator line, it gets automatically stripped off when applying the patch:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubj)}(h ... Signed-off-by: Author --- V2 -> V3: Removed redundant helper function V1 -> V2: Cleaned up coding style and addressed review comments path/to/file | 5+++-- ...h]h ... Signed-off-by: Author --- V2 -> V3: Removed redundant helper function V1 -> V2: Cleaned up coding style and addressed review comments path/to/file | 5+++-- ...}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhM)hjhhubh)}(hHSee more details on the proper patch format in the following references.h]hHSee more details on the proper patch format in the following references.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hjhhubh)}(h.. _explicit_in_reply_to:h]h}(h]h ]h"]h$]h&]hexplicit-in-reply-touh1hhM6hjhhhhubeh}(h] commentaryah ]h"] commentaryah$]h&]uh1hhj, hhhhhMubeh}(h](j id1eh ]h"](the canonical patch formatthe_canonical_patch_formateh$]h&]uh1hhhhhhhhMj}j$j sj}j j subh)}(hhh](h)}(hExplicit In-Reply-To headersh]hExplicit In-Reply-To headers}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hhhhhM9ubh)}(hXcIt can be helpful to manually add In-Reply-To: headers to a patch (e.g., when using ``git send-email``) to associate the patch with previous relevant discussion, e.g. to link a bug fix to the email with the bug report. However, for a multi-patch series, it is generally best to avoid using In-Reply-To: to link to older versions of the series. This way multiple versions of the patch don't become an unmanageable forest of references in email clients. If a link is helpful, you can use the https://lore.kernel.org/ redirector (e.g., in the cover email text) to link to an earlier version of the patch series.h](hTIt can be helpful to manually add In-Reply-To: headers to a patch (e.g., when using }(hj:hhhNhNubh)}(h``git send-email``h]hgit send-email}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:ubhX) to associate the patch with previous relevant discussion, e.g. to link a bug fix to the email with the bug report. However, for a multi-patch series, it is generally best to avoid using In-Reply-To: to link to older versions of the series. This way multiple versions of the patch don’t become an unmanageable forest of references in email clients. If a link is helpful, you can use the }(hj:hhhNhNubj)}(hhttps://lore.kernel.org/h]hhttps://lore.kernel.org/}(hjThhhNhNubah}(h]h ]h"]h$]h&]refurijVuh1jhj:ubh^ redirector (e.g., in the cover email text) to link to an earlier version of the patch series.}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM;hj)hhubeh}(h](explicit-in-reply-to-headersjeh ]h"](explicit in-reply-to headersexplicit_in_reply_toeh$]h&]uh1hhhhhhhhM9j}jsj sj}jj subh)}(hhh](h)}(hProviding base tree informationh]hProviding base tree information}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhhhhhMGubh)}(hX1When other developers receive your patches and start the review process, it is absolutely necessary for them to know what is the base commit/branch your work applies on, considering the sheer amount of maintainer trees present nowadays. Note again the **T:** entry in the MAINTAINERS file explained above.h](hWhen other developers receive your patches and start the review process, it is absolutely necessary for them to know what is the base commit/branch your work applies on, considering the sheer amount of maintainer trees present nowadays. Note again the }(hjhhhNhNubj)}(h**T:**h]hT:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh/ entry in the MAINTAINERS file explained above.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMIhjxhhubh)}(hThis is even more important for automated CI processes that attempt to run a series of tests in order to establish the quality of your submission before the maintainer starts the review.h]hThis is even more important for automated CI processes that attempt to run a series of tests in order to establish the quality of your submission before the maintainer starts the review.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjxhhubh)}(hIf you are using ``git format-patch`` to generate your patches, you can automatically include the base tree information in your submission by using the ``--base`` flag. The easiest and most convenient way to use this option is with topical branches::h](hIf you are using }(hjhhhNhNubh)}(h``git format-patch``h]hgit format-patch}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhs to generate your patches, you can automatically include the base tree information in your submission by using the }(hjhhhNhNubh)}(h ``--base``h]h--base}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhW flag. The easiest and most convenient way to use this option is with topical branches:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMShjxhhubj)}(hXP$ git checkout -t -b my-topical-branch master Branch 'my-topical-branch' set up to track local branch 'master'. Switched to a new branch 'my-topical-branch' [perform your edits and commits] $ git format-patch --base=auto --cover-letter -o outgoing/ master outgoing/0000-cover-letter.patch outgoing/0001-First-Commit.patch outgoing/...h]hXP$ git checkout -t -b my-topical-branch master Branch 'my-topical-branch' set up to track local branch 'master'. Switched to a new branch 'my-topical-branch' [perform your edits and commits] $ git format-patch --base=auto --cover-letter -o outgoing/ master outgoing/0000-cover-letter.patch outgoing/0001-First-Commit.patch outgoing/...}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMXhjxhhubh)}(hXWhen you open ``outgoing/0000-cover-letter.patch`` for editing, you will notice that it will have the ``base-commit:`` trailer at the very bottom, which provides the reviewer and the CI tools enough information to properly perform ``git am`` without worrying about conflicts::h](hWhen you open }(hjhhhNhNubh)}(h$``outgoing/0000-cover-letter.patch``h]h outgoing/0000-cover-letter.patch}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh4 for editing, you will notice that it will have the }(hjhhhNhNubh)}(h``base-commit:``h]h base-commit:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhq trailer at the very bottom, which provides the reviewer and the CI tools enough information to properly perform }(hjhhhNhNubh)}(h ``git am``h]hgit am}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh" without worrying about conflicts:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMchjxhhubj)}(h$ git checkout -b patch-review [base-commit-id] Switched to a new branch 'patch-review' $ git am patches.mbox Applying: First Commit Applying: ...h]h$ git checkout -b patch-review [base-commit-id] Switched to a new branch 'patch-review' $ git am patches.mbox Applying: First Commit Applying: ...}hj;sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhhjxhhubh)}(hKPlease see ``man git-format-patch`` for more information about this option.h](h Please see }(hjIhhhNhNubh)}(h``man git-format-patch``h]hman git-format-patch}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIubh( for more information about this option.}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMnhjxhhubhnote)}(h;The ``--base`` feature was introduced in git version 2.9.0.h]h)}(hjmh](hThe }(hjohhhNhNubh)}(h ``--base``h]h--base}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjoubh- feature was introduced in git version 2.9.0.}(hjohhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMshjkubah}(h]h ]h"]h$]h&]uh1jihjxhhhhhNubh)}(hXIf you are not using git to format your patches, you can still include the same ``base-commit`` trailer to indicate the commit hash of the tree on which your work is based. You should add it either in the cover letter or in the first patch of the series and it should be placed either below the ``---`` line or at the very bottom of all other content, right before your email signature.h](hPIf you are not using git to format your patches, you can still include the same }(hjhhhNhNubh)}(h``base-commit``h]h base-commit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh trailer to indicate the commit hash of the tree on which your work is based. You should add it either in the cover letter or in the first patch of the series and it should be placed either below the }(hjhhhNhNubh)}(h``---``h]h---}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhT line or at the very bottom of all other content, right before your email signature.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMuhjxhhubh)}(hMake sure that base commit is in an official maintainer/mainline tree and not in some internal, accessible only to you tree - otherwise it would be worthless.h]hMake sure that base commit is in an official maintainer/mainline tree and not in some internal, accessible only to you tree - otherwise it would be worthless.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjxhhubeh}(h]providing-base-tree-informationah ]h"]providing base tree informationah$]h&]uh1hhhhhhhhMGubh)}(hhh](h)}(hToolingh]hTooling}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hMany of the technical aspects of this process can be automated using b4, documented at . This can help with things like tracking dependencies, running checkpatch and with formatting and sending mails.h](hXMany of the technical aspects of this process can be automated using b4, documented at <}(hjhhhNhNubj)}(h%https://b4.docs.kernel.org/en/latest/h]h%https://b4.docs.kernel.org/en/latest/}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubhr>. This can help with things like tracking dependencies, running checkpatch and with formatting and sending mails.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]toolingah ]h"]toolingah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h Referencesh]h References}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubj)}(hhh](j )}(hWAndrew Morton, "The perfect patch" (tpp). h](j)}(h)Andrew Morton, "The perfect patch" (tpp).h]h-Andrew Morton, “The perfect patch” (tpp).}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj*ubj )}(hhh]h)}(h,h](h<}(hj?hhhNhNubj)}(h*https://www.ozlabs.org/~akpm/stuff/tpp.txth]h*https://www.ozlabs.org/~akpm/stuff/tpp.txt}(hjGhhhNhNubah}(h]h ]h"]h$]h&]refurijIuh1jhj?ubh>}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj<ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1j hhhMhj'ubj )}(hJeff Garzik, "Linux kernel patch submission format". h](j)}(h4Jeff Garzik, "Linux kernel patch submission format".h]h8Jeff Garzik, “Linux kernel patch submission format”.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjlubj )}(hhh]h)}(hRh](h<}(hjhhhNhNubj)}(hPhttps://web.archive.org/web/20180829112450/http://linux.yyz.us/patch-format.htmlh]hPhttps://web.archive.org/web/20180829112450/http://linux.yyz.us/patch-format.html}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubh>}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj~ubah}(h]h ]h"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]uh1j hhhMhj'hhubj )}(hXGreg Kroah-Hartman, "How to piss off a kernel subsystem maintainer". h](j)}(hDGreg Kroah-Hartman, "How to piss off a kernel subsystem maintainer".h]hHGreg Kroah-Hartman, “How to piss off a kernel subsystem maintainer”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj )}(hhh](h)}(h0h](h<}(hjhhhNhNubj)}(h.http://www.kroah.com/log/linux/maintainer.htmlh]h.http://www.kroah.com/log/linux/maintainer.html}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubh>}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h3h](h<}(hjhhhNhNubj)}(h1http://www.kroah.com/log/linux/maintainer-02.htmlh]h1http://www.kroah.com/log/linux/maintainer-02.html}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubh>}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h3h](h<}(hjhhhNhNubj)}(h1http://www.kroah.com/log/linux/maintainer-03.htmlh]h1http://www.kroah.com/log/linux/maintainer-03.html}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubh>}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h3h](h<}(hj&hhhNhNubj)}(h1http://www.kroah.com/log/linux/maintainer-04.htmlh]h1http://www.kroah.com/log/linux/maintainer-04.html}(hj.hhhNhNubah}(h]h ]h"]h$]h&]refurij0uh1jhj&ubh>}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h3h](h<}(hjGhhhNhNubj)}(h1http://www.kroah.com/log/linux/maintainer-05.htmlh]h1http://www.kroah.com/log/linux/maintainer-05.html}(hjOhhhNhNubah}(h]h ]h"]h$]h&]refurijQuh1jhjGubh>}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h3h](h<}(hjhhhhNhNubj)}(h1http://www.kroah.com/log/linux/maintainer-06.htmlh]h1http://www.kroah.com/log/linux/maintainer-06.html}(hjphhhNhNubah}(h]h ]h"]h$]h&]refurijruh1jhjhubh>}(hjhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hhhMhj'hhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(h-Kernel Documentation/process/coding-style.rsth]h-Kernel Documentation/process/coding-style.rst}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(hhh](j )}(hLinus Torvalds's mail on the canonical patch format: h](j)}(h4Linus Torvalds's mail on the canonical patch format:h]h6Linus Torvalds’s mail on the canonical patch format:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj )}(hhh]h)}(hMh](h<}(hjhhhNhNubj)}(hKhttps://lore.kernel.org/r/Pine.LNX.4.58.0504071023190.28951@ppc970.osdl.orgh]hKhttps://lore.kernel.org/r/Pine.LNX.4.58.0504071023190.28951@ppc970.osdl.org}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubh>}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hhhMhjubj )}(hAndi Kleen, "On submitting kernel patches" Some strategies to get difficult or controversial changes in. http://halobates.de/on-submitting-patches.pdfh](j)}(h*Andi Kleen, "On submitting kernel patches"h]h.Andi Kleen, “On submitting kernel patches”}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj )}(hhh](h)}(h=Some strategies to get difficult or controversial changes in.Uh]h=Some strategies to get difficult or controversial changes in.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h-http://halobates.de/on-submitting-patches.pdfh]j)}(hjh]h-http://halobates.de/on-submitting-patches.pdf}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j hhhMhjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h] referencesah ]h"] referencesah$]h&]uh1hhhhhhhhMubeh}(h](Ksubmitting-patches-the-essential-guide-to-getting-your-code-into-the-kernelheh ]h"](Lsubmitting patches: the essential guide to getting your code into the kernelsubmittingpatcheseh$]h&]uh1hhhhhhhhKj}jIhsj}hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjqerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(h]haj]jaj]jaj]jaj]jvaj ]j aj ]j aj]juaj]j aunameids}(jIhjHjEjjjjj j jjjjjjjjjzjwjjjjjjjjjjj. j+ j j j{ jx j j} j j j j j' j j& j# j$j j#j jjj!jjjjjjjjjjsjjrjojjjjj@j=u nametypes}(jIjHjjj jjjjjzjjjjjj. j j{ j j j j' j& j$j#jj!jjjjjsjrjjj@uh}(hhjEhjjNjjj jjjjjjjjjjwjjj}jjjjjjjjj+ jj j1 jx j^ j} j j j j j j j j# j j j, j j, jjo jjjj$jjjjjjjj)joj)jjxjjj=ju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages](hsystem_message)}(hhh]h)}(hhh]h7Hyperlink target "submittingpatches" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1jubj)}(hhh]h)}(hhh]h6Hyperlink target "describe-changes" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineK+uh1jubj)}(hhh]h)}(hhh]h3Hyperlink target "split-changes" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKuh1jubj)}(hhh]h)}(hhh]h9Hyperlink target "interleaved-replies" is not referenced.}hj2sbah}(h]h ]h"]h$]h&]uh1hhj/ubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineMNuh1jubj)}(hhh]h)}(hhh]h6Hyperlink target "resend-reminders" is not referenced.}hjLsbah}(h]h ]h"]h$]h&]uh1hhjIubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineMguh1jubj)}(hhh]h)}(hhh]h4Hyperlink target "tagging-people" is not referenced.}hjfsbah}(h]h ]h"]h$]h&]uh1hhjcubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineMmuh1jubj)}(hhh]h)}(hhh]h@Hyperlink target "the-canonical-patch-format" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhj}ubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineM|uh1jubj)}(hhh]h)}(hhh]h0Hyperlink target "backtraces" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineMuh1jubj)}(hhh]h)}(hhh]h:Hyperlink target "explicit-in-reply-to" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineM6uh1jube transformerN include_log] decorationNhhub.