aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/SubmittingPatches
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2007-06-01 03:46:48 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-01 11:18:28 -0400
commit0a920b5b666d0be8141bd1ce620fffa7de96b81b (patch)
tree9de51d4073895f72201040d4c7913dcc83b9ed4e /Documentation/SubmittingPatches
parentbc913b1899ce0c15ec496d1aa121c36785e0528a (diff)
add a trivial patch style checker
We are seeing increasing levels of minor patch style violations in submissions to the mailing lists as well as making it into the tree. These detract from the quality of the submission and cause unnessary work for reviewers. As a first step package up the current state of the patch style checker and include it in the kernel tree. Add instructions suggesting running it on submissions. This adds version v0.01 of the checkpatch.pl script. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Joel Schopp <jschopp@austin.ibm.com> Cc: Randy Dunlap <rdunlap@xenotime.net> Cc: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/SubmittingPatches')
-rw-r--r--Documentation/SubmittingPatches39
1 files changed, 28 insertions, 11 deletions
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index a417b25fb1aa..d91125ab6f49 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -118,7 +118,20 @@ then only post say 15 or so at a time and wait for review and integration.
118 118
119 119
120 120
1214) Select e-mail destination. 1214) Style check your changes.
122
123Check your patch for basic style violations, details of which can be
124found in Documentation/CodingStyle. Failure to do so simply wastes
125the reviewers time and will get your patch rejected, probabally
126without even being read.
127
128At a minimum you should check your patches with the patch style
129checker prior to submission (scripts/patchcheck.pl). You should
130be able to justify all violations that remain in your patch.
131
132
133
1345) Select e-mail destination.
122 135
123Look through the MAINTAINERS file and the source code, and determine 136Look through the MAINTAINERS file and the source code, and determine
124if your change applies to a specific subsystem of the kernel, with 137if your change applies to a specific subsystem of the kernel, with
@@ -146,7 +159,7 @@ discussed should the patch then be submitted to Linus.
146 159
147 160
148 161
1495) Select your CC (e-mail carbon copy) list. 1626) Select your CC (e-mail carbon copy) list.
150 163
151Unless you have a reason NOT to do so, CC linux-kernel@vger.kernel.org. 164Unless you have a reason NOT to do so, CC linux-kernel@vger.kernel.org.
152 165
@@ -187,8 +200,7 @@ URL: <http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/>
187 200
188 201
189 202
190 2037) No MIME, no links, no compression, no attachments. Just plain text.
1916) No MIME, no links, no compression, no attachments. Just plain text.
192 204
193Linus and other kernel developers need to be able to read and comment 205Linus and other kernel developers need to be able to read and comment
194on the changes you are submitting. It is important for a kernel 206on the changes you are submitting. It is important for a kernel
@@ -223,9 +235,9 @@ pref("mailnews.display.disable_format_flowed_support", true);
223 235
224 236
225 237
2267) E-mail size. 2388) E-mail size.
227 239
228When sending patches to Linus, always follow step #6. 240When sending patches to Linus, always follow step #7.
229 241
230Large changes are not appropriate for mailing lists, and some 242Large changes are not appropriate for mailing lists, and some
231maintainers. If your patch, uncompressed, exceeds 40 kB in size, 243maintainers. If your patch, uncompressed, exceeds 40 kB in size,
@@ -234,7 +246,7 @@ server, and provide instead a URL (link) pointing to your patch.
234 246
235 247
236 248
2378) Name your kernel version. 2499) Name your kernel version.
238 250
239It is important to note, either in the subject line or in the patch 251It is important to note, either in the subject line or in the patch
240description, the kernel version to which this patch applies. 252description, the kernel version to which this patch applies.
@@ -244,7 +256,7 @@ Linus will not apply it.
244 256
245 257
246 258
2479) Don't get discouraged. Re-submit. 25910) Don't get discouraged. Re-submit.
248 260
249After you have submitted your change, be patient and wait. If Linus 261After you have submitted your change, be patient and wait. If Linus
250likes your change and applies it, it will appear in the next version 262likes your change and applies it, it will appear in the next version
@@ -270,7 +282,7 @@ When in doubt, solicit comments on linux-kernel mailing list.
270 282
271 283
272 284
27310) Include PATCH in the subject 28511) Include PATCH in the subject
274 286
275Due to high e-mail traffic to Linus, and to linux-kernel, it is common 287Due to high e-mail traffic to Linus, and to linux-kernel, it is common
276convention to prefix your subject line with [PATCH]. This lets Linus 288convention to prefix your subject line with [PATCH]. This lets Linus
@@ -279,7 +291,7 @@ e-mail discussions.
279 291
280 292
281 293
28211) Sign your work 29412) Sign your work
283 295
284To improve tracking of who did what, especially with patches that can 296To improve tracking of who did what, especially with patches that can
285percolate to their final resting place in the kernel through several 297percolate to their final resting place in the kernel through several
@@ -328,7 +340,8 @@ now, but you can do this to mark internal company procedures or just
328point out some special detail about the sign-off. 340point out some special detail about the sign-off.
329 341
330 342
33112) The canonical patch format 343
34413) The canonical patch format
332 345
333The canonical patch subject line is: 346The canonical patch subject line is:
334 347
@@ -427,6 +440,10 @@ section Linus Computer Science 101.
427Nuff said. If your code deviates too much from this, it is likely 440Nuff said. If your code deviates too much from this, it is likely
428to be rejected without further review, and without comment. 441to be rejected without further review, and without comment.
429 442
443Check your patches with the patch style checker prior to submission
444(scripts/checkpatch.pl). You should be able to justify all
445violations that remain in your patch.
446
430 447
431 448
4322) #ifdefs are ugly 4492) #ifdefs are ugly