提交过程

step1: get the right branch

可以参考 MAINTAINERS文件,可能不对,直接看git.kernel.org, 注意git pull到最新

step2: generate one patch

git format-patch -1 commit_id

cover-letter给一次提交多个用

step3: check patch

$ ./scripts/checkpatch.pl *.patch

没有错误会提示total: 0 errors, 0 warnings

step4: get maintainers

./scripts/get_maintainer.pl *.patch 

比如下面:

Andrew Morton <akpm@linux-foundation.org> (commit_signer:111/121=92%)
Vlastimil Babka <vbabka@suse.cz> (commit_signer:61/121=50%,authored:21/121=17%,added_lines:302/1333=23%,removed_lines:256/1268=20%)
Mel Gorman <mgorman@techsingularity.net> (commit_signer:57/121=47%,authored:29/121=24%,added_lines:433/1333=32%,removed_lines:407/1268=32%)
Michal Hocko <mhocko@suse.com> (commit_signer:44/121=36%,authored:16/121=13%,added_lines:229/1333=17%,removed_lines:201/1268=16%)
Johannes Weiner <hannes@cmpxchg.org> (commit_signer:21/121=17%)
Joonsoo Kim <iamjoonsoo.kim@lge.com> (authored:9/121=7%,added_lines:78/1333=6%,removed_lines:78/1268=6%)
Minchan Kim <minchan@kernel.org> (authored:7/121=6%)
linux-mm@kvack.org (open list:MEMORY MANAGEMENT)
linux-kernel@vger.kernel.org (open list)

两个open list, linux-mm@kvack.org就是内核内存的邮件列表(在http://www.spinics.net/lists/mm-commits/),linux-kernel@vger.kernel.org就是LKML.org内核邮件列表了。

step5: send email
to 维护人,cc open list就可以了,可以先send to自己测试下, mail list可以订阅了解下动态。

a. using git send-email xx.patch –to
b. using standard email client, windows可以用Claws Mail,适合win上办公linux无上网权限的。

step6: discussion
do not top post,最好要部分引用回复,客户端用推荐的见email-clients.txt。

step7: update your patch
如果维护人让你修改,那在修改完成后要给patch加个版本,比如第二版用如下命令:

git format-patch --subject-prefix="PATCH v2" -1 commit_id

生成patch后用在”—“下添加change log,比如:

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
v2: xxx

ok,完成后git send-email这个patch。

notes about tags:

一般maintainer会有resend this patch的要求,比如忘记Cc了,resend时记得要加Reviewed-by等tag,如果resend多次记得加版本号…

step8: 发送补丁集

git format-patch -o out/ --cover-letter -n --thread=shallow commit_id_start^..commit_id_end

编辑cover-letter patch, then send out目录即可。

refer doc