Development: How to submit patches: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
m (grammer)
m (add note about inline patches (Alexey Klimov's message drew attention to this) and a note about submission status from patchwork page)
Line 12: Line 12:
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files)
:* Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files)
:* Add a '''Signed-off-by: Your name <name@yoursite.com>''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]
:* Add a '''Signed-off-by: Your name <name@yoursite.com>''' as a [[Development: Submitting Patches#Developer.27s_Certificate_of_Origin_1.1|Developer's Certificate of Origin 1.1 ]]
:* Send the patch inline, not as an attachment (unless asked to do so otherwise) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the <code>/usr/src/linux/Documentation/email-clients.txt</code> file; a current copy of which can also be found online [http://lxr.linux.no/linux+v2.6.28.5/Documentation/email-clients.txt here]).
:* Send the patch inline, not as an attachment (unless asked to do so otherwise)


Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]
Hint: There is also a [[Development: Linux Kernel patch submittal checklist|checklist for patch submission]]


== After you've Submitted: What happens Next? ==
== After you've Submitted: What happens Next? ==
In the past, it was, unfortunately, not uncommon for patches to become overlooked or lost on the V4L-DVB mailing lists. However, with the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here]). So, provided you have correctly submitted your patch, the steps towards having your code adopted will have been put into motion.
In the past, it was, unfortunately, not uncommon for patches to become overlooked or lost on the V4L-DVB mailing lists. However, with the new Linux-media mailing list, V4L-DVB is now using the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork tool] for aggregating patches sent into the list (you can read more about it [http://www.linuxtv.org/news.php?entry=2009-01-06.mchehab here]). So, provided you have correctly submitted your patch, the steps towards having your code adopted will have been put into motion. You can, of course, check to see the status of your submission from the [http://patchwork.kernel.org/project/linux-media/list/ Patchwork webpage].


The first thing you should expect is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties. This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)
The first thing you should expect next is that a [[Development: Code Review|code review]] will be performed, and often this is by various parties. This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)


Then, when your patch is accepted, it will initially be applied to the main V4L-DVB mercurial tree. Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and periodically pulled by Linus.
Then, when your patch is accepted, it will initially be applied to the main V4L-DVB mercurial tree. Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and periodically pulled by Linus.

Revision as of 01:01, 16 February 2009

This article provides an overview for submitting patches against V4L-DVB kernel driver modules and/or documentation. For general references in regards as to how to develop support for a particular device or in writing a new device driver, see here.

Patch Preparation

Patches should be created against the master V4L-DVB mercurial tree; for instructions on obtaining these sources, see the "How to build from Mercurial" article.

Post your patches to the linux-media mailing list for review and testing. Subscription to the mailing list is recommended, though it is not required.

Follow the guidelines in Submitting Patches (cf. jgarzik's version), including:

  • Verify best-practice kernel coding style
  • Use [PATCH] in the subject line to get attention
  • Explain what the patch does and to what hardware it applies
  • Document your work where appropriate (i.e. in the form of patches to the Documentation/video4linux or Documentation/dvb files)
  • Add a Signed-off-by: Your name <name@yoursite.com> as a Developer's Certificate of Origin 1.1
  • Send the patch inline, not as an attachment (unless asked to do so otherwise) ... patches presented in the form of inline text in the body of an email are easier to deal with from the perspective of a peer review process (for more information, see the /usr/src/linux/Documentation/email-clients.txt file; a current copy of which can also be found online here).

Hint: There is also a checklist for patch submission

After you've Submitted: What happens Next?

In the past, it was, unfortunately, not uncommon for patches to become overlooked or lost on the V4L-DVB mailing lists. However, with the new Linux-media mailing list, V4L-DVB is now using the Patchwork tool for aggregating patches sent into the list (you can read more about it here). So, provided you have correctly submitted your patch, the steps towards having your code adopted will have been put into motion. You can, of course, check to see the status of your submission from the Patchwork webpage.

The first thing you should expect next is that a code review will be performed, and often this is by various parties. This may lead to a series of requests for you to fix any observed problems and require you to then resubmit your work, by repeating the steps outlined above, until everyone is happy with the submission. In other words: wash, rinse, repeat ;)

Then, when your patch is accepted, it will initially be applied to the main V4L-DVB mercurial tree. Once tested and integrated, such patches are later merged into a git tree by the V4L-DVB maintainer and periodically pulled by Linus.