2016-11-14 17:16:21

by Walt Feasel

[permalink] [raw]
Subject: Patch procedure

Here is how I am going about making the patches. It is basically
what I have picked up from kernel newbies among other sites
and videos on making patches. I would be greatful for any
pointers on what seems to be the problem(s) with why it does
not produce a proper patch.


I will use drivers/staging/xgifb/vb_setmode.c as the example
as it was one of my latest and largest.


I run:

./scripts/checkpatch.pl --terse --strict --file drivers/staging/xgifb/vb_setmode.c

Patch submissions needed
CHECK: spaces preferred around that '+' (ctx:VxV) 1
CHECK: Alignment should match open parenthesis 9
CHECK: No space is necessary after a cast 7
CHECK: Logical continuations should be on the previous line 1
WARNING: braces {} are not necessary for single statement blocks 1
Spelling 1

0 errors, 2 warnings, 538 checks, 5526 lines checked


I count each occurance for each type of warning/check I will work on
and figure how many patches will be needed for each.
i.e 90 CHECK: Alignment should match open parenthesis comes to 9 patches.

This example would be 20 total patches in the series.


I check for spelling errors to add a patch or not.


I check to see if non checkpatch type fixes are needed.
i.e. columns/comments need to aligned


I check the mailing list to see if the same type if patches have been
submitted in the last year.


I make all edits needed for one issue
(save Alignment should match open parenthesis for last as other changes
will effect it.)


I open git gui, select rescan, then add hunks to a size that is not
too big and edit the subject, commit message and signed off by.

(It is easier to see how long the patch will be from the hunks and how
many more I have left to fit into the allotted patch series.)


[STYLE 1/20]staging:vb_setmode.c Align to parenthesis

Make suggested modification from checkpatch in reference
to: CHECK: Alignment should match open parenthesis

Signed-off-by: Walt Feasel <[email protected]>


Commit it


perl scripts/get_maintainer.pl --nogit-fallback --norolestats
-f drivers/staging/xgifb/vb_setmode.c

Arnaud Patard <[email protected]>
Greg Kroah-Hartman <[email protected]>
[email protected]
[email protected]

I also check the TODO list to see if there are any others that
need to copied for the patches.

(The very first patches I used had a option that was removing
the mailing list for some but not others. I dont know why.
it was just what I had copied from a site telling me how to
get the emails to send too.)


git send-email --annotate HEAD^ --to [email protected]
--cc [email protected] -cc [email protected]
--cc [email protected]


Verify the message info and press ctrl-x


Send this email? ([y]es|[n]o|[q]uit|[a]ll): y


repeat for remaining hunks.


When all hunks are done start next issue.


I will remove [STYLE] (thought it would make easier to skip if
you did not have time to review just style changes).

New subject example would be:

staging: xgifb: vb_setmode.c Align to parenthesis


In the beginning I made all of the edits at one time per file,
now I only do one type cause I cant separate if two different
issues are part of the same hunk.


The numbering of sequence I will add leading 0 when needed in the
[PATCH v2 09/20]

New subject line would read as:
[PATCH v2 09/20] staging: xgifb: vb_setmode.c Align to parenthesis

The subject lines are the same for the same type of fix except for
the series number.

The patch would be too large if I sent them all in one. I don't know
how else you would want me to name them when there may be 9 patches
for the same issue to keep file size/length down.


Walt


2016-11-15 07:21:37

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: Patch procedure

On Mon, Nov 14, 2016 at 12:16:08PM -0500, feas wrote:
> Here is how I am going about making the patches. It is basically
> what I have picked up from kernel newbies among other sites
> and videos on making patches. I would be greatful for any
> pointers on what seems to be the problem(s) with why it does
> not produce a proper patch.

<snip>

Honestly, it's not our job to review someone's patch creation
proceedures and notes as everyone does it differently. We will be glad
to review your patches that you create.

I think the review that I previously provided should be sufficient to
start with. Again, send a short patch series to verify this, do not
send 100+ patches without getting feedback on them.

thanks,

greg k-h

2016-11-15 09:11:06

by Ioana Ciornei

[permalink] [raw]
Subject: RE: Patch procedure


> -----Original Message-----
> From: [email protected] [mailto:linux-kernel-
> [email protected]] On Behalf Of feas
> Sent: Monday, November 14, 2016 7:16 PM
> To: [email protected]; [email protected]; linux-
> [email protected]
> Subject: Patch procedure
>

<snip>

I know you mentioned the kernel newbies page but just in case you missed this toturial, here is a link https://kernelnewbies.org/FirstKernelPatch. It has all the necessary info for you to submit a proper patch set.

Ioana C

2016-11-16 07:17:00

by Walt Feasel

[permalink] [raw]
Subject: Re: Patch procedure

On Tue, Nov 15, 2016 at 08:55:11AM +0000, Ioana Ciornei wrote:
>
> > -----Original Message-----
> > From: [email protected] [mailto:linux-kernel-
> > [email protected]] On Behalf Of feas
> > Sent: Monday, November 14, 2016 7:16 PM
> > To: [email protected]; [email protected]; linux-
> > [email protected]
> > Subject: Patch procedure
> >
>
> <snip>
>
> I know you mentioned the kernel newbies page but just in case you missed this toturial, here is a link https://kernelnewbies.org/FirstKernelPatch. It has all the necessary info for you to submit a proper patch set.
>
> Ioana C
Ioana,

Thank you for the link! I had read that but I think this one has fixed what I was
missing. It has me sending multiple patches together in one email vs sending
them individualy like I was doing. At least I hope the last one I sent is correct.

https://burzalodowa.wordpress.com/

Walt