Patch procedure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <waltfeasel@xxxxxxxxx>


Commit it


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

Arnaud Patard <arnaud.patard@xxxxxxxxxxx>
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
devel@xxxxxxxxxxxxxxxxxxxx
linux-kernel@xxxxxxxxxxxxxxx

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 arnaud.patard@xxxxxxxxxxx
--cc gregkh@xxxxxxxxxxxxxxxxxxx -cc devel@xxxxxxxxxxxxxxxxxxxx
--cc linux-kernel@xxxxxxxxxxxxxxx


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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux