1cd6b1674SKashyap Chamarthy.. _submitting-a-patch: 2cd6b1674SKashyap Chamarthy 39f73de8dSKashyap ChamarthySubmitting a Patch 49f73de8dSKashyap Chamarthy================== 59f73de8dSKashyap Chamarthy 6115847f6SAlex BennéeQEMU welcomes contributions to fix bugs, add functionality or improve 7115847f6SAlex Bennéethe documentation. However, we get a lot of patches, and so we have 8115847f6SAlex Bennéesome guidelines about submitting them. If you follow these, you'll 9115847f6SAlex Bennéehelp make our task of contribution review easier and your change is 10115847f6SAlex Bennéelikely to be accepted and committed faster. 119f73de8dSKashyap Chamarthy 129f73de8dSKashyap ChamarthyThis page seems very long, so if you are only trying to post a quick 139f73de8dSKashyap Chamarthyone-shot fix, the bare minimum we ask is that: 149f73de8dSKashyap Chamarthy 15ca127fe9SAlex Bennée.. list-table:: Minimal Checklist for Patches 16ca127fe9SAlex Bennée :widths: 35 65 17ca127fe9SAlex Bennée :header-rows: 1 18ca127fe9SAlex Bennée 19ca127fe9SAlex Bennée * - Check 20ca127fe9SAlex Bennée - Reason 21*270c81b7SDaniel P. Berrangé * - Patches contain Signed-off-by: Your Name <author@email> 22ca127fe9SAlex Bennée - States you are legally able to contribute the code. See :ref:`patch_emails_must_include_a_signed_off_by_line` 23ca127fe9SAlex Bennée * - Sent as patch emails to ``qemu-devel@nongnu.org`` 24ca127fe9SAlex Bennée - The project uses an email list based workflow. See :ref:`submitting_your_patches` 25ca127fe9SAlex Bennée * - Be prepared to respond to review comments 26ca127fe9SAlex Bennée - Code that doesn't pass review will not get merged. See :ref:`participating_in_code_review` 279f73de8dSKashyap Chamarthy 289f73de8dSKashyap ChamarthyYou do not have to subscribe to post (list policy is to reply-to-all to 299f73de8dSKashyap Chamarthypreserve CCs and keep non-subscribers in the loop on the threads they 309f73de8dSKashyap Chamarthystart), although you may find it easier as a subscriber to pick up good 319f73de8dSKashyap Chamarthyideas from other posts. If you do subscribe, be prepared for a high 329f73de8dSKashyap Chamarthyvolume of email, often over one thousand messages in a week. The list is 339f73de8dSKashyap Chamarthymoderated; first-time posts from an email address (whether or not you 349f73de8dSKashyap Chamarthysubscribed) may be subject to some delay while waiting for a moderator 352d2e4843SThomas Huthto allow your address. 369f73de8dSKashyap Chamarthy 379f73de8dSKashyap ChamarthyThe larger your contribution is, or if you plan on becoming a long-term 389f73de8dSKashyap Chamarthycontributor, then the more important the rest of this page becomes. 399f73de8dSKashyap ChamarthyReading the table of contents below should already give you an idea of 409f73de8dSKashyap Chamarthythe basic requirements. Use the table of contents as a reference, and 419f73de8dSKashyap Chamarthyread the parts that you have doubts about. 429f73de8dSKashyap Chamarthy 43cd6b1674SKashyap Chamarthy.. contents:: Table of Contents 44cd6b1674SKashyap Chamarthy 459f73de8dSKashyap Chamarthy.. _writing_your_patches: 469f73de8dSKashyap Chamarthy 479f73de8dSKashyap ChamarthyWriting your Patches 489f73de8dSKashyap Chamarthy-------------------- 499f73de8dSKashyap Chamarthy 509f73de8dSKashyap Chamarthy.. _use_the_qemu_coding_style: 519f73de8dSKashyap Chamarthy 529f73de8dSKashyap ChamarthyUse the QEMU coding style 539f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~ 549f73de8dSKashyap Chamarthy 559f73de8dSKashyap ChamarthyYou can run run *scripts/checkpatch.pl <patchfile>* before submitting to 569f73de8dSKashyap Chamarthycheck that you are in compliance with our coding standards. Be aware 579f73de8dSKashyap Chamarthythat ``checkpatch.pl`` is not infallible, though, especially where C 589f73de8dSKashyap Chamarthypreprocessor macros are involved; use some common sense too. See also: 599f73de8dSKashyap Chamarthy 60cd6b1674SKashyap Chamarthy- :ref:`coding-style` 619f73de8dSKashyap Chamarthy- `Automate a checkpatch run on 62cd6b1674SKashyap Chamarthy commit <https://blog.vmsplice.net/2011/03/how-to-automatically-run-checkpatchpl.html>`__ 639f73de8dSKashyap Chamarthy 649f73de8dSKashyap Chamarthy.. _base_patches_against_current_git_master: 659f73de8dSKashyap Chamarthy 669f73de8dSKashyap ChamarthyBase patches against current git master 679f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 689f73de8dSKashyap Chamarthy 699f73de8dSKashyap ChamarthyThere's no point submitting a patch which is based on a released version 709f73de8dSKashyap Chamarthyof QEMU because development will have moved on from then and it probably 719f73de8dSKashyap Chamarthywon't even apply to master. We only apply selected bugfixes to release 729f73de8dSKashyap Chamarthybranches and then only as backports once the code has gone into master. 739f73de8dSKashyap Chamarthy 74cd6b1674SKashyap ChamarthyIt is also okay to base patches on top of other on-going work that is 75cd6b1674SKashyap Chamarthynot yet part of the git master branch. To aid continuous integration 76cd6b1674SKashyap Chamarthytools, such as `patchew <http://patchew.org/QEMU/>`__, you should `add a 77cd6b1674SKashyap Chamarthytag <https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg01288.html>`__ 78cd6b1674SKashyap Chamarthyline ``Based-on: $MESSAGE_ID`` to your cover letter to make the series 79cd6b1674SKashyap Chamarthydependency obvious. 80cd6b1674SKashyap Chamarthy 819f73de8dSKashyap Chamarthy.. _split_up_long_patches: 829f73de8dSKashyap Chamarthy 839f73de8dSKashyap ChamarthySplit up long patches 849f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~ 859f73de8dSKashyap Chamarthy 869f73de8dSKashyap ChamarthySplit up longer patches into a patch series of logical code changes. 879f73de8dSKashyap ChamarthyEach change should compile and execute successfully. For instance, don't 889f73de8dSKashyap Chamarthyadd a file to the makefile in patch one and then add the file itself in 899f73de8dSKashyap Chamarthypatch two. (This rule is here so that people can later use tools like 909f73de8dSKashyap Chamarthy`git bisect <http://git-scm.com/docs/git-bisect>`__ without hitting 919f73de8dSKashyap Chamarthypoints in the commit history where QEMU doesn't work for reasons 929f73de8dSKashyap Chamarthyunrelated to the bug they're chasing.) Put documentation first, not 939f73de8dSKashyap Chamarthylast, so that someone reading the series can do a clean-room evaluation 949f73de8dSKashyap Chamarthyof the documentation, then validate that the code matched the 959f73de8dSKashyap Chamarthydocumentation. A commit message that mentions "Also, ..." is often a 969f73de8dSKashyap Chamarthygood candidate for splitting into multiple patches. For more thoughts on 979f73de8dSKashyap Chamarthyproperly splitting patches and writing good commit messages, see `this 989f73de8dSKashyap Chamarthyadvice from 999f73de8dSKashyap ChamarthyOpenStack <https://wiki.openstack.org/wiki/GitCommitMessages>`__. 1009f73de8dSKashyap Chamarthy 1019f73de8dSKashyap Chamarthy.. _make_code_motion_patches_easy_to_review: 1029f73de8dSKashyap Chamarthy 1039f73de8dSKashyap ChamarthyMake code motion patches easy to review 1049f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1059f73de8dSKashyap Chamarthy 1069f73de8dSKashyap ChamarthyIf a series requires large blocks of code motion, there are tricks for 1079f73de8dSKashyap Chamarthymaking the refactoring easier to review. Split up the series so that 1089f73de8dSKashyap Chamarthysemantic changes (or even function renames) are done in a separate patch 109cd6b1674SKashyap Chamarthyfrom the raw code motion. Use a one-time setup of ``git config 110cd6b1674SKashyap Chamarthydiff.renames true;`` ``git config diff.algorithm patience`` (refer to 111cd6b1674SKashyap Chamarthy`git-config <http://git-scm.com/docs/git-config>`__). The 'diff.renames' 112cd6b1674SKashyap Chamarthyproperty ensures file rename patches will be given in a more compact 113cd6b1674SKashyap Chamarthyrepresentation that focuses only on the differences across the file 114cd6b1674SKashyap Chamarthyrename, instead of showing the entire old file as a deletion and the new 115cd6b1674SKashyap Chamarthyfile as an insertion. Meanwhile, the 'diff.algorithm' property ensures 116cd6b1674SKashyap Chamarthythat extracting a non-contiguous subset of one file into a new file, but 117cd6b1674SKashyap Chamarthywhere all extracted parts occur in the same order both before and after 118cd6b1674SKashyap Chamarthythe patch, will reduce churn in trying to treat unrelated ``}`` lines in 119cd6b1674SKashyap Chamarthythe original file as separating hunks of changes. 1209f73de8dSKashyap Chamarthy 1219f73de8dSKashyap ChamarthyIdeally, a code motion patch can be reviewed by doing:: 1229f73de8dSKashyap Chamarthy 1239f73de8dSKashyap Chamarthy git format-patch --stdout -1 > patch; 1249f73de8dSKashyap Chamarthy diff -u <(sed -n 's/^-//p' patch) <(sed -n 's/^\+//p' patch) 1259f73de8dSKashyap Chamarthy 1269f73de8dSKashyap Chamarthyto focus on the few changes that weren't wholesale code motion. 1279f73de8dSKashyap Chamarthy 1289f73de8dSKashyap Chamarthy.. _dont_include_irrelevant_changes: 1299f73de8dSKashyap Chamarthy 1309f73de8dSKashyap ChamarthyDon't include irrelevant changes 1319f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329f73de8dSKashyap Chamarthy 1339f73de8dSKashyap ChamarthyIn particular, don't include formatting, coding style or whitespace 1349f73de8dSKashyap Chamarthychanges to bits of code that would otherwise not be touched by the 1359f73de8dSKashyap Chamarthypatch. (It's OK to fix coding style issues in the immediate area (few 1369f73de8dSKashyap Chamarthylines) of the lines you're changing.) If you think a section of code 1379f73de8dSKashyap Chamarthyreally does need a reindent or other large-scale style fix, submit this 1389f73de8dSKashyap Chamarthyas a separate patch which makes no semantic changes; don't put it in the 1399f73de8dSKashyap Chamarthysame patch as your bug fix. 1409f73de8dSKashyap Chamarthy 1419f73de8dSKashyap ChamarthyFor smaller patches in less frequently changed areas of QEMU, consider 142cd6b1674SKashyap Chamarthyusing the :ref:`trivial-patches` process. 1439f73de8dSKashyap Chamarthy 1449f73de8dSKashyap Chamarthy.. _write_a_meaningful_commit_message: 1459f73de8dSKashyap Chamarthy 1469f73de8dSKashyap ChamarthyWrite a meaningful commit message 1479f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1489f73de8dSKashyap Chamarthy 1499f73de8dSKashyap ChamarthyCommit messages should be meaningful and should stand on their own as a 1509f73de8dSKashyap Chamarthyhistorical record of why the changes you applied were necessary or 1519f73de8dSKashyap Chamarthyuseful. 1529f73de8dSKashyap Chamarthy 1539f73de8dSKashyap ChamarthyQEMU follows the usual standard for git commit messages: the first line 1549f73de8dSKashyap Chamarthy(which becomes the email subject line) is "subsystem: single line 1559f73de8dSKashyap Chamarthysummary of change". Whether the "single line summary of change" starts 1569f73de8dSKashyap Chamarthywith a capital is a matter of taste, but we prefer that the summary does 157cd6b1674SKashyap Chamarthynot end in a dot. Look at ``git shortlog -30`` for an idea of sample 1589f73de8dSKashyap Chamarthysubject lines. Then there is a blank line and a more detailed 1599f73de8dSKashyap Chamarthydescription of the patch, another blank and your Signed-off-by: line. 1609f73de8dSKashyap ChamarthyPlease do not use lines that are longer than 76 characters in your 1619f73de8dSKashyap Chamarthycommit message (so that the text still shows up nicely with "git show" 1629f73de8dSKashyap Chamarthyin a 80-columns terminal window). 1639f73de8dSKashyap Chamarthy 1649f73de8dSKashyap ChamarthyThe body of the commit message is a good place to document why your 1659f73de8dSKashyap Chamarthychange is important. Don't include comments like "This is a suggestion 1669f73de8dSKashyap Chamarthyfor fixing this bug" (they can go below the ``---`` line in the email so 1679f73de8dSKashyap Chamarthythey don't go into the final commit message). Make sure the body of the 1689f73de8dSKashyap Chamarthycommit message can be read in isolation even if the reader's mailer 1699f73de8dSKashyap Chamarthydisplays the subject line some distance apart (that is, a body that 1709f73de8dSKashyap Chamarthystarts with "... so that" as a continuation of the subject line is 1719f73de8dSKashyap Chamarthyharder to follow). 1729f73de8dSKashyap Chamarthy 173cd6b1674SKashyap ChamarthyIf your patch fixes a commit that is already in the repository, please 174cd6b1674SKashyap Chamarthyadd an additional line with "Fixes: <at-least-12-digits-of-SHA-commit-id> 175cd6b1674SKashyap Chamarthy("Fixed commit subject")" below the patch description / before your 176cd6b1674SKashyap Chamarthy"Signed-off-by:" line in the commit message. 177cd6b1674SKashyap Chamarthy 178cd6b1674SKashyap ChamarthyIf your patch fixes a bug in the gitlab bug tracker, please add a line 179cd6b1674SKashyap Chamarthywith "Resolves: <URL-of-the-bug>" to the commit message, too. Gitlab can 180b1f8536cSManos Pitsidianakisclose bugs automatically once commits with the "Resolves:" keyword get 181cd6b1674SKashyap Chamarthymerged into the master branch of the project. And if your patch addresses 182cd6b1674SKashyap Chamarthya bug in another public bug tracker, you can also use a line with 183cd6b1674SKashyap Chamarthy"Buglink: <URL-of-the-bug>" for reference here, too. 184cd6b1674SKashyap Chamarthy 185cd6b1674SKashyap ChamarthyExample:: 186cd6b1674SKashyap Chamarthy 187cd6b1674SKashyap Chamarthy Fixes: 14055ce53c2d ("s390x/tcg: avoid overflows in time2tod/tod2time") 188cd6b1674SKashyap Chamarthy Resolves: https://gitlab.com/qemu-project/qemu/-/issues/42 189cd6b1674SKashyap Chamarthy Buglink: https://bugs.launchpad.net/qemu/+bug/1804323`` 190cd6b1674SKashyap Chamarthy 19193e86b16SKashyap ChamarthySome other tags that are used in commit messages include "Message-Id:" 19293e86b16SKashyap Chamarthy"Tested-by:", "Acked-by:", "Reported-by:", "Suggested-by:". See ``git 19393e86b16SKashyap Chamarthylog`` for these keywords for example usage. 19493e86b16SKashyap Chamarthy 195cd6b1674SKashyap Chamarthy.. _test_your_patches: 196cd6b1674SKashyap Chamarthy 197cd6b1674SKashyap ChamarthyTest your patches 198cd6b1674SKashyap Chamarthy~~~~~~~~~~~~~~~~~ 199cd6b1674SKashyap Chamarthy 2007266ecceSAlex BennéeAlthough QEMU uses various :ref:`ci` services that attempt to test 2017266ecceSAlex Bennéepatches submitted to the list, it still saves everyone time if you 2027266ecceSAlex Bennéehave already tested that your patch compiles and works. Because QEMU 2037266ecceSAlex Bennéeis such a large project the default configuration won't create a 2047266ecceSAlex Bennéetesting pipeline on GitLab when a branch is pushed. See the :ref:`CI 2057266ecceSAlex Bennéevariable documentation<ci_var>` for details on how to control the 2067266ecceSAlex Bennéerunning of tests; but it is still wise to also check that your patches 2077266ecceSAlex Bennéework with a full build before submitting a series, especially if your 2087266ecceSAlex Bennéechanges might have an unintended effect on other areas of the code you 2097266ecceSAlex Bennéedon't normally experiment with. See :ref:`testing` for more details on 2107266ecceSAlex Bennéewhat tests are available. 2117266ecceSAlex Bennée 2127266ecceSAlex BennéeAlso, it is a wise idea to include a testsuite addition as part of 2137266ecceSAlex Bennéeyour patches - either to ensure that future changes won't regress your 2147266ecceSAlex Bennéenew feature, or to add a test which exposes the bug that the rest of 2157266ecceSAlex Bennéeyour series fixes. Keeping separate commits for the test and the fix 2167266ecceSAlex Bennéeallows reviewers to rebase the test to occur first to prove it catches 2177266ecceSAlex Bennéethe problem, then again to place it last in the series so that 2187266ecceSAlex Bennéebisection doesn't land on a known-broken state. 219cd6b1674SKashyap Chamarthy 2209f73de8dSKashyap Chamarthy.. _submitting_your_patches: 2219f73de8dSKashyap Chamarthy 2229f73de8dSKashyap ChamarthySubmitting your Patches 2239f73de8dSKashyap Chamarthy----------------------- 2249f73de8dSKashyap Chamarthy 225ca127fe9SAlex BennéeThe QEMU project uses a public email based workflow for reviewing and 226ca127fe9SAlex Bennéemerging patches. As a result all contributions to QEMU must be **sent 227ca127fe9SAlex Bennéeas patches** to the qemu-devel `mailing list 228ca127fe9SAlex Bennée<https://wiki.qemu.org/Contribute/MailingLists>`__. Patch 229ca127fe9SAlex Bennéecontributions should not be posted on the bug tracker, posted on 230ca127fe9SAlex Bennéeforums, or externally hosted and linked to. (We have other mailing 231ca127fe9SAlex Bennéelists too, but all patches must go to qemu-devel, possibly with a Cc: 232ca127fe9SAlex Bennéeto another list.) ``git send-email`` (`step-by-step setup guide 233ca127fe9SAlex Bennée<https://git-send-email.io/>`__ and `hints and tips 234ca127fe9SAlex Bennée<https://elixir.bootlin.com/linux/latest/source/Documentation/process/email-clients.rst>`__) 235ca127fe9SAlex Bennéeworks best for delivering the patch without mangling it, but 236ca127fe9SAlex Bennéeattachments can be used as a last resort on a first-time submission. 237ca127fe9SAlex Bennée 238cd6b1674SKashyap Chamarthy.. _if_you_cannot_send_patch_emails: 239cd6b1674SKashyap Chamarthy 240cd6b1674SKashyap ChamarthyIf you cannot send patch emails 241cd6b1674SKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 242cd6b1674SKashyap Chamarthy 243cd6b1674SKashyap ChamarthyIn rare cases it may not be possible to send properly formatted patch 244cd6b1674SKashyap Chamarthyemails. You can use `sourcehut <https://sourcehut.org/>`__ to send your 245cd6b1674SKashyap Chamarthypatches to the QEMU mailing list by following these steps: 246cd6b1674SKashyap Chamarthy 247cd6b1674SKashyap Chamarthy#. Register or sign in to your account 248cd6b1674SKashyap Chamarthy#. Add your SSH public key in `meta \| 249cd6b1674SKashyap Chamarthy keys <https://meta.sr.ht/keys>`__. 250cd6b1674SKashyap Chamarthy#. Publish your git branch using **git push git@git.sr.ht:~USERNAME/qemu 251cd6b1674SKashyap Chamarthy HEAD** 252cd6b1674SKashyap Chamarthy#. Send your patches to the QEMU mailing list using the web-based 253cd6b1674SKashyap Chamarthy ``git-send-email`` UI at https://git.sr.ht/~USERNAME/qemu/send-email 254cd6b1674SKashyap Chamarthy 255cd6b1674SKashyap Chamarthy`This video 256cd6b1674SKashyap Chamarthy<https://spacepub.space/videos/watch/ad258d23-0ac6-488c-83fc-2bacf578de3a>`__ 257cd6b1674SKashyap Chamarthyshows the web-based ``git-send-email`` workflow. Documentation is 258cd6b1674SKashyap Chamarthyavailable `here 259cd6b1674SKashyap Chamarthy<https://man.sr.ht/git.sr.ht/#sending-patches-upstream>`__. 260cd6b1674SKashyap Chamarthy 2619f73de8dSKashyap Chamarthy.. _cc_the_relevant_maintainer: 2629f73de8dSKashyap Chamarthy 2639f73de8dSKashyap ChamarthyCC the relevant maintainer 2649f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~ 2659f73de8dSKashyap Chamarthy 2669f73de8dSKashyap ChamarthySend patches both to the mailing list and CC the maintainer(s) of the 2679f73de8dSKashyap Chamarthyfiles you are modifying. look in the MAINTAINERS file to find out who 2689f73de8dSKashyap Chamarthythat is. Also try using scripts/get_maintainer.pl from the repository 2699f73de8dSKashyap Chamarthyfor learning the most common committers for the files you touched. 2709f73de8dSKashyap Chamarthy 2719f73de8dSKashyap ChamarthyExample:: 2729f73de8dSKashyap Chamarthy 2739f73de8dSKashyap Chamarthy ~/src/qemu/scripts/get_maintainer.pl -f hw/ide/core.c 2749f73de8dSKashyap Chamarthy 2759f73de8dSKashyap ChamarthyIn fact, you can automate this, via a one-time setup of ``git config 2769f73de8dSKashyap Chamarthysendemail.cccmd 'scripts/get_maintainer.pl --nogit-fallback'`` (Refer to 2779f73de8dSKashyap Chamarthy`git-config <http://git-scm.com/docs/git-config>`__.) 2789f73de8dSKashyap Chamarthy 2799f73de8dSKashyap Chamarthy.. _do_not_send_as_an_attachment: 2809f73de8dSKashyap Chamarthy 2819f73de8dSKashyap ChamarthyDo not send as an attachment 2829f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2839f73de8dSKashyap Chamarthy 2849f73de8dSKashyap ChamarthySend patches inline so they are easy to reply to with review comments. 2859f73de8dSKashyap ChamarthyDo not put patches in attachments. 2869f73de8dSKashyap Chamarthy 2879f73de8dSKashyap Chamarthy.. _use_git_format_patch: 2889f73de8dSKashyap Chamarthy 2899f73de8dSKashyap ChamarthyUse ``git format-patch`` 2909f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~ 2919f73de8dSKashyap Chamarthy 2929f73de8dSKashyap ChamarthyUse the right diff format. 2939f73de8dSKashyap Chamarthy`git format-patch <http://git-scm.com/docs/git-format-patch>`__ will 2949f73de8dSKashyap Chamarthyproduce patch emails in the right format (check the documentation to 2959f73de8dSKashyap Chamarthyfind out how to drive it). You can then edit the cover letter before 2969f73de8dSKashyap Chamarthyusing ``git send-email`` to mail the files to the mailing list. (We 2979f73de8dSKashyap Chamarthyrecommend `git send-email <http://git-scm.com/docs/git-send-email>`__ 2989f73de8dSKashyap Chamarthybecause mail clients often mangle patches by wrapping long lines or 2999f73de8dSKashyap Chamarthymessing up whitespace. Some distributions do not include send-email in a 3009f73de8dSKashyap Chamarthydefault install of git; you may need to download additional packages, 3019f73de8dSKashyap Chamarthysuch as 'git-email' on Fedora-based systems.) Patch series need a cover 3029f73de8dSKashyap Chamarthyletter, with shallow threading (all patches in the series are 3039f73de8dSKashyap Chamarthyin-reply-to the cover letter, but not to each other); single unrelated 3049f73de8dSKashyap Chamarthypatches do not need a cover letter (but if you do send a cover letter, 305cd6b1674SKashyap Chamarthyuse ``--numbered`` so the cover and the patch have distinct subject lines). 3069f73de8dSKashyap ChamarthyPatches are easier to find if they start a new top-level thread, rather 3079f73de8dSKashyap Chamarthythan being buried in-reply-to another existing thread. 3089f73de8dSKashyap Chamarthy 309cd6b1674SKashyap Chamarthy.. _avoid_posting_large_binary_blob: 310cd6b1674SKashyap Chamarthy 311cd6b1674SKashyap ChamarthyAvoid posting large binary blob 312cd6b1674SKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 313cd6b1674SKashyap Chamarthy 314cd6b1674SKashyap ChamarthyIf you added binaries to the repository, consider producing the patch 315cd6b1674SKashyap Chamarthyemails using ``git format-patch --no-binary`` and include a link to a 316cd6b1674SKashyap Chamarthygit repository to fetch the original commit. 317cd6b1674SKashyap Chamarthy 3189f73de8dSKashyap Chamarthy.. _patch_emails_must_include_a_signed_off_by_line: 3199f73de8dSKashyap Chamarthy 3209f73de8dSKashyap ChamarthyPatch emails must include a ``Signed-off-by:`` line 3219f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3229f73de8dSKashyap Chamarthy 323ca127fe9SAlex BennéeYour patches **must** include a Signed-off-by: line. This is a hard 324ca127fe9SAlex Bennéerequirement because it's how you say "I'm legally okay to contribute 325ca127fe9SAlex Bennéethis and happy for it to go into QEMU". The process is modelled after 326ca127fe9SAlex Bennéethe `Linux kernel 327ca127fe9SAlex Bennée<http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches?id=f6f94e2ab1b33f0082ac22d71f66385a60d8157f#n297>`__ 328ca127fe9SAlex Bennéepolicy. 3299f73de8dSKashyap Chamarthy 3309f73de8dSKashyap ChamarthyIf you wrote the patch, make sure your "From:" and "Signed-off-by:" 3319f73de8dSKashyap Chamarthylines use the same spelling. It's okay if you subscribe or contribute to 3329f73de8dSKashyap Chamarthythe list via more than one address, but using multiple addresses in one 3339f73de8dSKashyap Chamarthycommit just confuses things. If someone else wrote the patch, git will 3349f73de8dSKashyap Chamarthyinclude a "From:" line in the body of the email (different from your 3359f73de8dSKashyap Chamarthyenvelope From:) that will give credit to the correct author; but again, 3369f73de8dSKashyap Chamarthythat author's Signed-off-by: line is mandatory, with the same spelling. 3379f73de8dSKashyap Chamarthy 338*270c81b7SDaniel P. BerrangéThe name used with "Signed-off-by" does not need to be your legal name, 339*270c81b7SDaniel P. Berrangénor birth name, nor appear on any government ID. It is the identity you 340*270c81b7SDaniel P. Berrangéchoose to be known by in the community, but should not be anonymous, 341*270c81b7SDaniel P. Berrangénor misrepresent whom you are. 342*270c81b7SDaniel P. Berrangé 343ca127fe9SAlex BennéeThere are various tooling options for automatically adding these tags 344ca127fe9SAlex Bennéeinclude using ``git commit -s`` or ``git format-patch -s``. For more 345ca127fe9SAlex Bennéeinformation see `SubmittingPatches 1.12 346ca127fe9SAlex Bennée<http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches?id=f6f94e2ab1b33f0082ac22d71f66385a60d8157f#n297>`__. 347ca127fe9SAlex Bennée 3489f73de8dSKashyap Chamarthy.. _include_a_meaningful_cover_letter: 3499f73de8dSKashyap Chamarthy 3509f73de8dSKashyap ChamarthyInclude a meaningful cover letter 3519f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3529f73de8dSKashyap Chamarthy 353cd6b1674SKashyap ChamarthyThis is a requirement for any series with multiple patches (as it aids 354cd6b1674SKashyap Chamarthycontinuous integration), but optional for an isolated patch. The cover 355cd6b1674SKashyap Chamarthyletter explains the overall goal of such a series, and also provides a 356cd6b1674SKashyap Chamarthyconvenient 0/N email for others to reply to the series as a whole. A 357cd6b1674SKashyap Chamarthyone-time setup of ``git config format.coverletter auto`` (refer to 358cd6b1674SKashyap Chamarthy`git-config <http://git-scm.com/docs/git-config>`__) will generate the 359cd6b1674SKashyap Chamarthycover letter as needed. 3609f73de8dSKashyap Chamarthy 3619f73de8dSKashyap ChamarthyWhen reviewers don't know your goal at the start of their review, they 3629f73de8dSKashyap Chamarthymay object to early changes that don't make sense until the end of the 3639f73de8dSKashyap Chamarthyseries, because they do not have enough context yet at that point of 3649f73de8dSKashyap Chamarthytheir review. A series where the goal is unclear also risks a higher 3659f73de8dSKashyap Chamarthynumber of review-fix cycles because the reviewers haven't bought into 3669f73de8dSKashyap Chamarthythe idea yet. If the cover letter can explain these points to the 3679f73de8dSKashyap Chamarthyreviewer, the process will be smoother patches will get merged faster. 3689f73de8dSKashyap ChamarthyMake sure your cover letter includes a diffstat of changes made over the 3699f73de8dSKashyap Chamarthyentire series; potential reviewers know what files they are interested 3709f73de8dSKashyap Chamarthyin, and they need an easy way determine if your series touches them. 3719f73de8dSKashyap Chamarthy 3729f73de8dSKashyap Chamarthy.. _use_the_rfc_tag_if_needed: 3739f73de8dSKashyap Chamarthy 3749f73de8dSKashyap ChamarthyUse the RFC tag if needed 3759f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~ 3769f73de8dSKashyap Chamarthy 3779f73de8dSKashyap ChamarthyFor example, "[PATCH RFC v2]". ``git format-patch --subject-prefix=RFC`` 3789f73de8dSKashyap Chamarthycan help. 3799f73de8dSKashyap Chamarthy 3809f73de8dSKashyap Chamarthy"RFC" means "Request For Comments" and is a statement that you don't 3819f73de8dSKashyap Chamarthyintend for your patchset to be applied to master, but would like some 3829f73de8dSKashyap Chamarthyreview on it anyway. Reasons for doing this include: 3839f73de8dSKashyap Chamarthy 3849f73de8dSKashyap Chamarthy- the patch depends on some pending kernel changes which haven't yet 3859f73de8dSKashyap Chamarthy been accepted, so the QEMU patch series is blocked until that 3869f73de8dSKashyap Chamarthy dependency has been dealt with, but is worth reviewing anyway 3879f73de8dSKashyap Chamarthy- the patch set is not finished yet (perhaps it doesn't cover all use 3889f73de8dSKashyap Chamarthy cases or work with all targets) but you want early review of a major 3899f73de8dSKashyap Chamarthy API change or design structure before continuing 3909f73de8dSKashyap Chamarthy 3919f73de8dSKashyap ChamarthyIn general, since it's asking other people to do review work on a 3929f73de8dSKashyap Chamarthypatchset that the submitter themselves is saying shouldn't be applied, 3939f73de8dSKashyap Chamarthyit's best to: 3949f73de8dSKashyap Chamarthy 3959f73de8dSKashyap Chamarthy- use it sparingly 3969f73de8dSKashyap Chamarthy- in the cover letter, be clear about why a patch is an RFC, what areas 3979f73de8dSKashyap Chamarthy of the patchset you're looking for review on, and why reviewers 3989f73de8dSKashyap Chamarthy should care 3999f73de8dSKashyap Chamarthy 400cd6b1674SKashyap Chamarthy.. _consider_whether_your_patch_is_applicable_for_stable: 401cd6b1674SKashyap Chamarthy 402cd6b1674SKashyap ChamarthyConsider whether your patch is applicable for stable 403cd6b1674SKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 404cd6b1674SKashyap Chamarthy 405cd6b1674SKashyap ChamarthyIf your patch fixes a severe issue or a regression, it may be applicable 406cd6b1674SKashyap Chamarthyfor stable. In that case, consider adding ``Cc: qemu-stable@nongnu.org`` 407cd6b1674SKashyap Chamarthyto your patch to notify the stable maintainers. 408cd6b1674SKashyap Chamarthy 409cd6b1674SKashyap ChamarthyFor more details on how QEMU's stable process works, refer to the 410cd6b1674SKashyap Chamarthy:ref:`stable-process` page. 411cd6b1674SKashyap Chamarthy 4129f73de8dSKashyap Chamarthy.. _participating_in_code_review: 4139f73de8dSKashyap Chamarthy 4149f73de8dSKashyap ChamarthyParticipating in Code Review 4159f73de8dSKashyap Chamarthy---------------------------- 4169f73de8dSKashyap Chamarthy 4179f73de8dSKashyap ChamarthyAll patches submitted to the QEMU project go through a code review 418ca127fe9SAlex Bennéeprocess before they are accepted. This will often mean a series will 419ca127fe9SAlex Bennéego through a number of iterations before being picked up by 420ca127fe9SAlex Bennée:ref:`maintainers<maintainers>`. You therefore should be prepared to 421ca127fe9SAlex Bennéeread replies to your messages and be willing to act on them. 422ca127fe9SAlex Bennée 423ca127fe9SAlex BennéeMaintainers are often willing to manually fix up first-time 424ca127fe9SAlex Bennéecontributions, since there is a learning curve involved in making an 425ca127fe9SAlex Bennéeideal patch submission. However for the best results you should 426ca127fe9SAlex Bennéeproactively respond to suggestions with changes or justifications for 427ca127fe9SAlex Bennéeyour current approach. 428ca127fe9SAlex Bennée 429ca127fe9SAlex BennéeSome areas of code that are well maintained may review patches 430ca127fe9SAlex Bennéequickly, lesser-loved areas of code may have a longer delay. 4319f73de8dSKashyap Chamarthy 4329f73de8dSKashyap Chamarthy.. _stay_around_to_fix_problems_raised_in_code_review: 4339f73de8dSKashyap Chamarthy 4349f73de8dSKashyap ChamarthyStay around to fix problems raised in code review 4359f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4369f73de8dSKashyap Chamarthy 4379f73de8dSKashyap ChamarthyNot many patches get into QEMU straight away -- it is quite common that 4389f73de8dSKashyap Chamarthydevelopers will identify bugs, or suggest a cleaner approach, or even 4399f73de8dSKashyap Chamarthyjust point out code style issues or commit message typos. You'll need to 4409f73de8dSKashyap Chamarthyrespond to these, and then send a second version of your patches with 4419f73de8dSKashyap Chamarthythe issues fixed. This takes a little time and effort on your part, but 44273ee4c55SAlex Bennéeif you don't do it then your changes will never get into QEMU. 44373ee4c55SAlex Bennée 44473ee4c55SAlex BennéeRemember that a maintainer is under no obligation to take your 44573ee4c55SAlex Bennéepatches. If someone has spent the time reviewing your code and 44673ee4c55SAlex Bennéesuggesting improvements and you simply re-post without either 44773ee4c55SAlex Bennéeaddressing the comment directly or providing additional justification 44873ee4c55SAlex Bennéefor the change then it becomes wasted effort. You cannot demand others 44973ee4c55SAlex Bennéemerge and then fix up your code after the fact. 4509f73de8dSKashyap Chamarthy 4519f73de8dSKashyap ChamarthyWhen replying to comments on your patches **reply to all and not just 4529f73de8dSKashyap Chamarthythe sender** -- keeping discussion on the mailing list means everybody 45373ee4c55SAlex Bennéecan follow it. Remember the spirit of the :ref:`code_of_conduct` and 45473ee4c55SAlex Bennéekeep discussions respectful and collaborative and avoid making 45573ee4c55SAlex Bennéepersonal comments. 4569f73de8dSKashyap Chamarthy 4579f73de8dSKashyap Chamarthy.. _pay_attention_to_review_comments: 4589f73de8dSKashyap Chamarthy 4599f73de8dSKashyap ChamarthyPay attention to review comments 4609f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4619f73de8dSKashyap Chamarthy 4629f73de8dSKashyap ChamarthySomeone took their time to review your work, and it pays to respect that 4639f73de8dSKashyap Chamarthyeffort; repeatedly submitting a series without addressing all comments 4649f73de8dSKashyap Chamarthyfrom the previous round tends to alienate reviewers and stall your 4659f73de8dSKashyap Chamarthypatch. Reviewers aren't always perfect, so it is okay if you want to 4669f73de8dSKashyap Chamarthyargue that your code was correct in the first place instead of blindly 4679f73de8dSKashyap Chamarthydoing everything the reviewer asked. On the other hand, if someone 4689f73de8dSKashyap Chamarthypointed out a potential issue during review, then even if your code 4699f73de8dSKashyap Chamarthyturns out to be correct, it's probably a sign that you should improve 4709f73de8dSKashyap Chamarthyyour commit message and/or comments in the code explaining why the code 4719f73de8dSKashyap Chamarthyis correct. 4729f73de8dSKashyap Chamarthy 4739f73de8dSKashyap ChamarthyIf you fix issues that are raised during review **resend the entire 4749f73de8dSKashyap Chamarthypatch series** not just the one patch that was changed. This allows 4759f73de8dSKashyap Chamarthymaintainers to easily apply the fixed series without having to manually 4769f73de8dSKashyap Chamarthyidentify which patches are relevant. Send the new version as a complete 4779f73de8dSKashyap Chamarthyfresh email or series of emails -- don't try to make it a followup to 4789f73de8dSKashyap Chamarthyversion 1. (This helps automatic patch email handling tools distinguish 4799f73de8dSKashyap Chamarthybetween v1 and v2 emails.) 4809f73de8dSKashyap Chamarthy 4819f73de8dSKashyap Chamarthy.. _when_resending_patches_add_a_version_tag: 4829f73de8dSKashyap Chamarthy 4839f73de8dSKashyap ChamarthyWhen resending patches add a version tag 4849f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4859f73de8dSKashyap Chamarthy 4869f73de8dSKashyap ChamarthyAll patches beyond the first version should include a version tag -- for 4879f73de8dSKashyap Chamarthyexample, "[PATCH v2]". This means people can easily identify whether 4889f73de8dSKashyap Chamarthythey're looking at the most recent version. (The first version of a 4899f73de8dSKashyap Chamarthypatch need not say "v1", just [PATCH] is sufficient.) For patch series, 4909f73de8dSKashyap Chamarthythe version applies to the whole series -- even if you only change one 4919f73de8dSKashyap Chamarthypatch, you resend the entire series and mark it as "v2". Don't try to 4929f73de8dSKashyap Chamarthytrack versions of different patches in the series separately. `git 4939f73de8dSKashyap Chamarthyformat-patch <http://git-scm.com/docs/git-format-patch>`__ and `git 4949f73de8dSKashyap Chamarthysend-email <http://git-scm.com/docs/git-send-email>`__ both understand 4959f73de8dSKashyap Chamarthythe ``-v2`` option to make this easier. Send each new revision as a new 4969f73de8dSKashyap Chamarthytop-level thread, rather than burying it in-reply-to an earlier 4979f73de8dSKashyap Chamarthyrevision, as many reviewers are not looking inside deep threads for new 4989f73de8dSKashyap Chamarthypatches. 4999f73de8dSKashyap Chamarthy 5009f73de8dSKashyap Chamarthy.. _include_version_history_in_patchset_revisions: 5019f73de8dSKashyap Chamarthy 5029f73de8dSKashyap ChamarthyInclude version history in patchset revisions 5039f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5049f73de8dSKashyap Chamarthy 5059f73de8dSKashyap ChamarthyFor later versions of patches, include a summary of changes from 5069f73de8dSKashyap Chamarthyprevious versions, but not in the commit message itself. In an email 507cd6b1674SKashyap Chamarthyformatted as a git patch, the commit message is the part above the ``---`` 5089f73de8dSKashyap Chamarthyline, and this will go into the git changelog when the patch is 5099f73de8dSKashyap Chamarthycommitted. This part should be a self-contained description of what this 5109f73de8dSKashyap Chamarthyversion of the patch does, written to make sense to anybody who comes 5119f73de8dSKashyap Chamarthyback to look at this commit in git in six months' time. The part below 512cd6b1674SKashyap Chamarthythe ``---`` line and above the patch proper (git format-patch puts the 5139f73de8dSKashyap Chamarthydiffstat here) is a good place to put remarks for people reading the 5149f73de8dSKashyap Chamarthypatch email, and this is where the "changes since previous version" 515cd6b1674SKashyap Chamarthysummary belongs. The `git-publish 516cd6b1674SKashyap Chamarthy<https://github.com/stefanha/git-publish>`__ script can help with 517cd6b1674SKashyap Chamarthytracking a good summary across versions. Also, the `git-backport-diff 518cd6b1674SKashyap Chamarthy<https://github.com/codyprime/git-scripts>`__ script can help focus 519cd6b1674SKashyap Chamarthyreviewers on what changed between revisions. 5209f73de8dSKashyap Chamarthy 5219f73de8dSKashyap Chamarthy.. _tips_and_tricks: 5229f73de8dSKashyap Chamarthy 5239f73de8dSKashyap ChamarthyTips and Tricks 5249f73de8dSKashyap Chamarthy--------------- 5259f73de8dSKashyap Chamarthy 5269f73de8dSKashyap Chamarthy.. _proper_use_of_reviewed_by_tags_can_aid_review: 5279f73de8dSKashyap Chamarthy 5289f73de8dSKashyap ChamarthyProper use of Reviewed-by: tags can aid review 5299f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5309f73de8dSKashyap Chamarthy 5319f73de8dSKashyap ChamarthyWhen reviewing a large series, a reviewer can reply to some of the 5329f73de8dSKashyap Chamarthypatches with a Reviewed-by tag, stating that they are happy with that 5339f73de8dSKashyap Chamarthypatch in isolation (sometimes conditional on minor cleanup, like fixing 5349f73de8dSKashyap Chamarthywhitespace, that doesn't affect code content). You should then update 5359f73de8dSKashyap Chamarthythose commit messages by hand to include the Reviewed-by tag, so that in 5369f73de8dSKashyap Chamarthythe next revision, reviewers can spot which patches were already clean 5379f73de8dSKashyap Chamarthyfrom the previous round. Conversely, if you significantly modify a patch 5389f73de8dSKashyap Chamarthythat was previously reviewed, remove the reviewed-by tag out of the 5399f73de8dSKashyap Chamarthycommit message, as well as listing the changes from the previous 5409f73de8dSKashyap Chamarthyversion, to make it easier to focus a reviewer's attention to your 5419f73de8dSKashyap Chamarthychanges. 5429f73de8dSKashyap Chamarthy 5439f73de8dSKashyap Chamarthy.. _if_your_patch_seems_to_have_been_ignored: 5449f73de8dSKashyap Chamarthy 5459f73de8dSKashyap ChamarthyIf your patch seems to have been ignored 5469f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5479f73de8dSKashyap Chamarthy 5489f73de8dSKashyap ChamarthyIf your patchset has received no replies you should "ping" it after a 5499f73de8dSKashyap Chamarthyweek or two, by sending an email as a reply-to-all to the patch mail, 5509f73de8dSKashyap Chamarthyincluding the word "ping" and ideally also a link to the page for the 551cd6b1674SKashyap Chamarthypatch on `patchew <https://patchew.org/QEMU/>`__ or 552cd6b1674SKashyap Chamarthy`lore.kernel.org <https://lore.kernel.org/qemu-devel/>`__. It's worth 553cd6b1674SKashyap Chamarthydouble-checking for reasons why your patch might have been ignored 554cd6b1674SKashyap Chamarthy(forgot to CC the maintainer? annoyed people by failing to respond to 555cd6b1674SKashyap Chamarthyreview comments on an earlier version?), but often for less-maintained 556cd6b1674SKashyap Chamarthyareas of QEMU patches do just slip through the cracks. If your ping is 557cd6b1674SKashyap Chamarthyalso ignored, ping again after another week or so. As the submitter, you 558cd6b1674SKashyap Chamarthyare the person with the most motivation to get your patch applied, so 559cd6b1674SKashyap Chamarthyyou have to be persistent. 5609f73de8dSKashyap Chamarthy 5619f73de8dSKashyap Chamarthy.. _is_my_patch_in: 5629f73de8dSKashyap Chamarthy 5639f73de8dSKashyap ChamarthyIs my patch in? 5649f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~ 5659f73de8dSKashyap Chamarthy 566cd6b1674SKashyap ChamarthyQEMU has some Continuous Integration machines that try to catch patch 567cd6b1674SKashyap Chamarthysubmission problems as soon as possible. `patchew 568cd6b1674SKashyap Chamarthy<http://patchew.org/QEMU/>`__ includes a web interface for tracking the 569cd6b1674SKashyap Chamarthystatus of various threads that have been posted to the list, and may 570cd6b1674SKashyap Chamarthysend you an automated mail if it detected a problem with your patch. 571cd6b1674SKashyap Chamarthy 5729f73de8dSKashyap ChamarthyOnce your patch has had enough review on list, the maintainer for that 5739f73de8dSKashyap Chamarthyarea of code will send notification to the list that they are including 5749f73de8dSKashyap Chamarthyyour patch in a particular staging branch. Periodically, the maintainer 575cd6b1674SKashyap Chamarthythen takes care of :ref:`submitting-a-pull-request` 576cd6b1674SKashyap Chamarthyfor aggregating topic branches into mainline QEMU. Generally, you do not 5779f73de8dSKashyap Chamarthyneed to send a pull request unless you have contributed enough patches 5789f73de8dSKashyap Chamarthyto become a maintainer over a particular section of code. Maintainers 5799f73de8dSKashyap Chamarthymay further modify your commit, by resolving simple merge conflicts or 5809f73de8dSKashyap Chamarthyfixing minor typos pointed out during review, but will always add a 5819f73de8dSKashyap ChamarthySigned-off-by line in addition to yours, indicating that it went through 5829f73de8dSKashyap Chamarthytheir tree. Occasionally, the maintainer's pull request may hit more 5839f73de8dSKashyap Chamarthydifficult merge conflicts, where you may be requested to help rebase and 5849f73de8dSKashyap Chamarthyresolve the problems. It may take a couple of weeks between when your 5859f73de8dSKashyap Chamarthypatch first had a positive review to when it finally lands in qemu.git; 5869f73de8dSKashyap Chamarthyrelease cycle freezes may extend that time even longer. 5879f73de8dSKashyap Chamarthy 5889f73de8dSKashyap Chamarthy.. _return_the_favor: 5899f73de8dSKashyap Chamarthy 5909f73de8dSKashyap ChamarthyReturn the favor 5919f73de8dSKashyap Chamarthy~~~~~~~~~~~~~~~~ 5929f73de8dSKashyap Chamarthy 5939f73de8dSKashyap ChamarthyPeer review only works if everyone chips in a bit of review time. If 5949f73de8dSKashyap Chamarthyeveryone submitted more patches than they reviewed, we would have a 5959f73de8dSKashyap Chamarthypatch backlog. A good goal is to try to review at least as many patches 5969f73de8dSKashyap Chamarthyfrom others as what you submit. Don't worry if you don't know the code 5979f73de8dSKashyap Chamarthybase as well as a maintainer; it's perfectly fine to admit when your 5989f73de8dSKashyap Chamarthyreview is weak because you are unfamiliar with the code. 599