* [PATCH 2.6.2] Documentation/SubmittingPatches
@ 2004-02-05 7:23 Bryan Whitehead
2004-02-05 8:18 ` Riley Williams
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Bryan Whitehead @ 2004-02-05 7:23 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
I've been trying to get my feet wet by submitting trivial patchs to various maintainers and the responses have been, "your not submiting you patches correctly". It seems most developers/maintainers want a diff done like this:
cd /source-tree
diff -u linux-2.6.2/FileToPatch.orig linux-2.6.2/FileToPatch
instead of the "SubmitingPatches" document way:
cd /source-tree/linux-2.6.2
diff -u FileToPatch.orig FileToPatch
It would be _great_ if the Documentation was more accurate to the taste of developers/maintainers...
If the SubmittingPatches document is correct, then just toss this patch out because this won't be submitted right... ;)
--- linux-2.6.2/Documentation/SubmittingPatches.orig 2004-02-04 22:57:55.818563016 -0800
+++ linux-2.6.2/Documentation/SubmittingPatches 2004-02-04 23:01:28.799185040 -0800
@@ -33,13 +33,15 @@
To create a patch for a single file, it is often sufficient to do:
- SRCTREE= /devel/linux-2.4
+ SRCTREE= /devel/
+ SRCDIR= linux-2.4
MYFILE= drivers/net/mydriver.c
- cd $SRCTREE
+ cd $SRCTREE/$SRCDIR
cp $MYFILE $MYFILE.orig
vi $MYFILE # make your change
- diff -u $MYFILE.orig $MYFILE > /tmp/patch
+ cd $SRCTREE
+ diff -u $SRCDIR/$MYFILE.orig $SRCDIR/$MYFILE > /tmp/patch
To create a patch for multiple files, you should unpack a "vanilla",
or unmodified kernel source tree, and generate a diff against your
--
Bryan Whitehead
Email:driver@megahappy.net
WorkE:driver@jpl.nasa.gov
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 2.6.2] Documentation/SubmittingPatches
2004-02-05 7:23 [PATCH 2.6.2] Documentation/SubmittingPatches Bryan Whitehead
@ 2004-02-05 8:18 ` Riley Williams
2004-02-05 19:05 ` Arthur Othieno
2004-02-06 3:45 ` jw schultz
2 siblings, 0 replies; 6+ messages in thread
From: Riley Williams @ 2004-02-05 8:18 UTC (permalink / raw)
To: Bryan Whitehead; +Cc: Linux Kernel Development
Hi Bryan.
> I've been trying to get my feet wet by submitting trivial
> patches to various maintainers and the responses have been,
> "you're not submitting you patches correctly". It seems most
> developers/maintainers want a diff done like this:
>
> cd /source-tree
> diff -u linux-2.6.2/FileToPatch.orig linux-2.6.2/FileToPatch
>
> instead of the "SubmitingPatches" document way:
>
> cd /source-tree/linux-2.6.2
> diff -u FileToPatch.orig FileToPatch
>
> It would be _great_ if the Documentation was more accurate to
> the taste of developers/maintainers...
Obviously, I can't speak for the rest of the developers, but my
personal stance has always been this: If I can identify both the
kernel version the patch is against and where in the source tree
is being patched, I will apply the patch. If not, I won't.
I suspect the change you note is due to the number of people who
submit patches within a directory in the source tree that don't
indicate either of the above facts. If the answers aren't obvious
from the email, I run `find -name ${FILE}` from the root directory
of the current source tree and if there's not more than three
possibilities for the file, I will try patching each of them to
see whether the patch will apply to any of them. Beyond that, I
want further information from the submitter.
One other thing I've found useful is to increase the context given
in the diff by using -u5 rather than just -u as that considerably
increases the chances of a successful patch when other patches have
already been applied. However, that's very much personal preference
and probably not shared by other developers.
As an example, if somebody sends me a patch that tweaks a file
called Makefile with no indication of either of the above - well,
let's just say I've better things to do with my time than to
search through the various files of that name in the various
kernel source trees to identify the correct one...
Best wishes from Riley.
---
* Nothing as pretty as a smile, nothing as ugly as a frown.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.576 / Virus Database: 365 - Release Date: 30-Jan-2004
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 2.6.2] Documentation/SubmittingPatches
2004-02-05 7:23 [PATCH 2.6.2] Documentation/SubmittingPatches Bryan Whitehead
2004-02-05 8:18 ` Riley Williams
@ 2004-02-05 19:05 ` Arthur Othieno
2004-02-06 3:45 ` jw schultz
2 siblings, 0 replies; 6+ messages in thread
From: Arthur Othieno @ 2004-02-05 19:05 UTC (permalink / raw)
To: Bryan Whitehead; +Cc: torvalds, linux-kernel
On Wed, Feb 04, 2004 at 11:23:03PM -0800, Bryan Whitehead wrote:
>
> I've been trying to get my feet wet by submitting trivial patchs to
> various maintainers and the responses have been, "your not submiting
> you patches correctly". It seems most developers/maintainers want a
> diff done like this:
>
> cd /source-tree
> diff -u linux-2.6.2/FileToPatch.orig linux-2.6.2/FileToPatch
>
> instead of the "SubmitingPatches" document way:
> cd /source-tree/linux-2.6.2
> diff -u FileToPatch.orig FileToPatch
>
> It would be _great_ if the Documentation was more accurate to the taste
> of developers/maintainers...
>
> If the SubmittingPatches document is correct, then just toss this patch
> out because this won't be submitted right... ;)
>
> --- linux-2.6.2/Documentation/SubmittingPatches.orig 2004-02-04 22:57:55.818563016 -0800
> +++ linux-2.6.2/Documentation/SubmittingPatches 2004-02-04 23:01:28.799185040 -0800
> @@ -33,13 +33,15 @@
>
> To create a patch for a single file, it is often sufficient to do:
>
> - SRCTREE= /devel/linux-2.4
> + SRCTREE= /devel/
> + SRCDIR= linux-2.4
> MYFILE= drivers/net/mydriver.c
Might as well change this to `linux-2.6' altogether.
Arthur
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6.2] Documentation/SubmittingPatches
2004-02-05 7:23 [PATCH 2.6.2] Documentation/SubmittingPatches Bryan Whitehead
2004-02-05 8:18 ` Riley Williams
2004-02-05 19:05 ` Arthur Othieno
@ 2004-02-06 3:45 ` jw schultz
2004-02-06 4:13 ` Randy.Dunlap
2 siblings, 1 reply; 6+ messages in thread
From: jw schultz @ 2004-02-06 3:45 UTC (permalink / raw)
To: linux-kernel
On Wed, Feb 04, 2004 at 11:23:03PM -0800, Bryan Whitehead wrote:
>
> I've been trying to get my feet wet by submitting trivial patchs to various maintainers and the responses have been, "your not submiting you patches correctly". It seems most developers/maintainers want a diff done like this:
>
> cd /source-tree
> diff -u linux-2.6.2/FileToPatch.orig linux-2.6.2/FileToPatch
>
> instead of the "SubmitingPatches" document way:
> cd /source-tree/linux-2.6.2
> diff -u FileToPatch.orig FileToPatch
>
> It would be _great_ if the Documentation was more accurate to the taste of developers/maintainers...
>
> If the SubmittingPatches document is correct, then just toss this patch out because this won't be submitted right... ;)
>
> --- linux-2.6.2/Documentation/SubmittingPatches.orig 2004-02-04 22:57:55.818563016 -0800
> +++ linux-2.6.2/Documentation/SubmittingPatches 2004-02-04 23:01:28.799185040 -0800
> @@ -33,13 +33,15 @@
>
> To create a patch for a single file, it is often sufficient to do:
>
> - SRCTREE= /devel/linux-2.4
> + SRCTREE= /devel/
> + SRCDIR= linux-2.4
> MYFILE= drivers/net/mydriver.c
>
> - cd $SRCTREE
> + cd $SRCTREE/$SRCDIR
> cp $MYFILE $MYFILE.orig
> vi $MYFILE # make your change
> - diff -u $MYFILE.orig $MYFILE > /tmp/patch
> + cd $SRCTREE
> + diff -u $SRCDIR/$MYFILE.orig $SRCDIR/$MYFILE > /tmp/patch
>
For what it may be worth I find patches a lot more useful
for review purposes if the -p (for --show-c-function) option
is also used.
--
________________________________________________________________
J.W. Schultz Pegasystems Technologies
email address: jw@pegasys.ws
Remember Cernan and Schmitt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6.2] Documentation/SubmittingPatches
2004-02-06 3:45 ` jw schultz
@ 2004-02-06 4:13 ` Randy.Dunlap
2004-02-06 17:23 ` Tim Bird
0 siblings, 1 reply; 6+ messages in thread
From: Randy.Dunlap @ 2004-02-06 4:13 UTC (permalink / raw)
To: jw schultz; +Cc: linux-kernel
On Thu, 5 Feb 2004 19:45:09 -0800 jw schultz <jw@pegasys.ws> wrote:
| On Wed, Feb 04, 2004 at 11:23:03PM -0800, Bryan Whitehead wrote:
| >
| > I've been trying to get my feet wet by submitting trivial patchs to various maintainers and the responses have been, "your not submiting you patches correctly". It seems most developers/maintainers want a diff done like this:
| >
| > cd /source-tree
| > diff -u linux-2.6.2/FileToPatch.orig linux-2.6.2/FileToPatch
| >
| > instead of the "SubmitingPatches" document way:
| > cd /source-tree/linux-2.6.2
| > diff -u FileToPatch.orig FileToPatch
| >
| > It would be _great_ if the Documentation was more accurate to the taste of developers/maintainers...
| >
| > If the SubmittingPatches document is correct, then just toss this patch out because this won't be submitted right... ;)
| >
| > --- linux-2.6.2/Documentation/SubmittingPatches.orig 2004-02-04 22:57:55.818563016 -0800
| > +++ linux-2.6.2/Documentation/SubmittingPatches 2004-02-04 23:01:28.799185040 -0800
| > @@ -33,13 +33,15 @@
| >
| > To create a patch for a single file, it is often sufficient to do:
| >
| > - SRCTREE= /devel/linux-2.4
| > + SRCTREE= /devel/
| > + SRCDIR= linux-2.4
| > MYFILE= drivers/net/mydriver.c
| >
| > - cd $SRCTREE
| > + cd $SRCTREE/$SRCDIR
| > cp $MYFILE $MYFILE.orig
| > vi $MYFILE # make your change
| > - diff -u $MYFILE.orig $MYFILE > /tmp/patch
| > + cd $SRCTREE
| > + diff -u $SRCDIR/$MYFILE.orig $SRCDIR/$MYFILE > /tmp/patch
| >
|
| For what it may be worth I find patches a lot more useful
| for review purposes if the -p (for --show-c-function) option
| is also used.
and which was recently added to SubmittingPatches .
But this should all get cleaned up...
--
~Randy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2.6.2] Documentation/SubmittingPatches
2004-02-06 4:13 ` Randy.Dunlap
@ 2004-02-06 17:23 ` Tim Bird
0 siblings, 0 replies; 6+ messages in thread
From: Tim Bird @ 2004-02-06 17:23 UTC (permalink / raw)
To: linux-kernel; +Cc: jw schultz
> On Thu, 5 Feb 2004 19:45:09 -0800 jw schultz <jw@pegasys.ws> wrote:
> It would be _great_ if the Documentation was more accurate to the
> taste of developers/maintainers...
> | > --- linux-2.6.2/Documentation/SubmittingPatches.orig 2004-02-04 22:57:55.818563016 -0800
> | > +++ linux-2.6.2/Documentation/SubmittingPatches 2004-02-04 23:01:28.799185040 -0800
> | > @@ -33,13 +33,15 @@
I thought the preferred method was:
--- linux-2.6.2.orig/Documentation/SubmittingPatches
+++ linux-2.6.2/Documentation/SubmittingPatches
In other words, I always thought you should have a whole parallel
original tree. This more nicely captures multi-file changes, IMHO, and
I've seen this a great deal.
=============================
Tim Bird
Architecture Group Co-Chair
CE Linux Forum
Senior Staff Engineer
Sony Electronics
E-mail: Tim.Bird@am.sony.com
=============================
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-02-06 17:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-05 7:23 [PATCH 2.6.2] Documentation/SubmittingPatches Bryan Whitehead
2004-02-05 8:18 ` Riley Williams
2004-02-05 19:05 ` Arthur Othieno
2004-02-06 3:45 ` jw schultz
2004-02-06 4:13 ` Randy.Dunlap
2004-02-06 17:23 ` Tim Bird
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox