1.. SPDX-License-Identifier: GPL-2.0-or-later
2
3.. include:: ../disclaimer-zh_TW.rst
4
5.. _tw_submittingpatches:
6
7:Original: Documentation/process/submitting-patches.rst
8
9:������:
10 - ������ TripleX Chung <xxx.phy@gmail.com>
11 - ��������� Alex Shi <alexs@kernel.org>
12 - ��������� Wu XiangCheng <bobwxc@email.cn>
13
14:������:
15 - ������ Li Yang <leoyang.li@nxp.com>
16 - ������ Wang Cong <xiyou.wangcong@gmail.com>
17 - ��������� Hu Haowen <2023002089@link.tyut.edu.cn>
18
19
20������������������������������������������������
21================================
22
23������������������������������ Linux ������������������������������������������������������������������
24������������������������������������������������������������������������������������������
25���������������������������.
26
27���������������������������������������������������������������������������������������������������������������
28��������� Documentation/translations/zh_CN/process/development-process.rst ���
29Documentation/translations/zh_CN/process/submit-checklist.rst ������������������
30���������������������������������������������������������������������������
31Documentation/devicetree/bindings/submitting-patches.rst ���
32
33������������������������������ ``git`` ��������������������������������������� ``git`` ���������������
34������������������������������������������������������������������������������������
35
36������������������������������������������������������������������������������������������������������
37Documentation/process/maintainer-handbooks.rst ���
38
39���������������������
40--------------
41
42������������������������������������������������������������������ ``git`` ���������������������������������
43���������������������������������������������������::
44
45    git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
46
47���������������������������������������������������������������������������������������������������������
48���������������������������������������������������������������������������MAINTAINERS���������������
49������ **T:** ���������������������������������������������������������������������������������
50
51.. _tw_describe_changes:
52
53������������������
54------------
55
56������������������������������������������������������������������5000���������������������������������������
57������������������������������������������������������������������������������������������������������������������
58���������������������������
59
60������������������������������������������������������������������������������������������������������������������
61������������������������������������������������������������������������������������������������������������������
62������������������������������������Linux���������������������������������������������������������������/������
63���������������������������������������������������������������������������������������������������������������������
64������������������DMESG���������������������������������������������������������������������
65
66������������������������������������������������������������������������������������������������������������������
67���������������������������������������������������������������������������������������������������������������������
68���CPU������������������������������������������������������������������������������������������������������������
69������������������������������������������������������������������������������������������
70
71���������������������������������������������������������������������������������������������������������������������
72������������������������������������������������������������������������������������������������
73
74���������������������������������������������������������������������������������������������������Linux���������
75��������������� ``git`` ���������������������������������������������
76������ :ref:`zh_the_canonical_patch_format` ���
77
78���������������������������������������������������������������������������������������������������������������������
79������ :ref:`zh_split_changes` ���
80
81������������������������������������������������������������������������������������������������
82������������������������������������������������������������������������������������������������������������������
83URL������������������������������������������������������������������������������������������������������������������
84������������������������������������������������������������������������������������������������������������
85
86������������������������������������������make xyzzy do frotz���������������[This patch]make
87xyzzy do frotz���������[I]changed xyzzy to do frotz������������������������������������������
88���������������������
89
90���������������������������������������������������������������������SHA-1 ID������������������������������
91���������������������������������������������������������������::
92
93        Commit e21d2170f36602ae2708 ("video: remove unnecessary
94        platform_set_drvdata()") removed the unnecessary
95        platform_set_drvdata(), but left the variable "dev" unused,
96        delete it.
97
98���������������������������������12���SHA-1 ID������������������������ *������* ���������������������ID
99���������������������������������������������������������������������������������ID���������������������������
100������������������������������
101
102���������������������������������������������������������������������������������Link:���������������������������
103������������������������������������������������������������URL���������������������������������������������������
104���������������������������������������������������������������������������������������������������������������������
105
106���������������������������������������������lore.kernel.org������������������������������������
107``Message-ID`` ������������������������������������������URL���������::
108
109    Link: https://lore.kernel.org/r/30th.anniversary.repost@klaava.Helsinki.FI/
110
111������������������������������������������������������������
112
113���������������������������������������������������������������������������������������������������������������������
114���������URL������������������������������������������������������������
115
116������������������������������������������������������������ ``git bisct`` ���������������������������������
117���������12���������SHA-1 ID������Fixes:������������������������������������������������������������������
118���������������������������������������75������������������������������������::
119
120  Fixes: 54a4f0239f2e ("KVM: MMU: make kvm_mmu_zap_page() return the number of pages it actually freed")
121
122������ ``git config`` ��������������� ``git log``, ``git show`` ���������������������������������::
123
124	[core]
125		abbrev = 12
126	[pretty]
127		fixes = Fixes: %h (\"%s\")
128
129������������::
130
131	$ git log -1 --pretty=fixes 54a4f0239f2e
132	Fixes: 54a4f0239f2e ("KVM: MMU: make kvm_mmu_zap_page() return the number of pages it actually freed")
133
134.. _tw_split_changes:
135
136������������������
137------------
138
139��������� **������������** ���������������������������������
140
141���������������������������������������bug���������������������������������������������������������������
142���������������������������������������������������������API���������������������������������������������API
143������������������������������������������������������
144
145���������������������������������������������������������������������������������������������������������
146���������������������������������������������������������������������������������������������������
147
148������������������������������������������������������������������������������������������������������������������
149���������������������������
150
151������������������������������������������������������������������������������������������������������
152������������������ **���������������������������������** ������������
153
154������������������������������������������������������������������������������������������������������������������
155������������������������������������ ``git bisect`` ������������������������������������������������������
156���������������������������������������������������������������������������������
157
158���������������������������������������������������������������������������15������������������������������
159������������
160
161������������������������
162----------------
163
164������������������������������������������������������������������������
165Documentation/translations/zh_CN/process/coding-style.rst
166���������������������������������������������������������������������������������������������������������������
167������������������������
168
169������������������������������������������������������������������������������������������������������������������
170���������������������������������������������������������������������������������������������������������������
171���������������������������������������������������������������������������������������������������������
172
173���������������������������������������������������������������scripts/check patch.pl���������������
174���������������������������������������������������������������������������������������������������������������
175������������������������������������������������������������������������
176
177������������������������������
178
179 - ERROR���������������������������
180 - WARNING������������������������������
181 - CHECK������������������������
182
183������������������������������������������������������������������
184
185���������������������
186--------------
187
188������������������������������������������������������������������������������
189���������������������������������������������������������������������������������������������
190scripts/get_maintainer.pl���������������������������������������������������������������������������
191������������������������Andrew Morton���akpm@linux-foundation.org���������������������������
192���������
193
194������������������������������������������������������������������������������linux-kernel@vger.kernel.org
195������������������������������������������������������������������������������������������������������������
196���MAINTAINERS������������������������������������������������������������������������������������������������
197���������������������������������������������������������
198
199���������������������������������������vger.kernel.org������������������
200http://vger.kernel.org/vger-lists.html ���������������������������������������������������������
201���������������������������������
202
203������������������������15������������vger������������������������
204
205Linus Torvalds��������������������������� Linux ������������������������������������������������
206torvalds@linux-foundation.org ������������������������������������������������������ **���**
207������������������
208
209��������������������������������������������������������������������������� security@kernel.org ���������
210���������bug���������������������������������������������������������������������������������������������������������
211���������������������������������������������������
212������ Documentation/translations/zh_CN/admin-guide/security-bugs.rst ���
213
214������������������������������������������������������������������������������������������������������������������
215������������������������������������������������������������������::
216
217  Cc: stable@vger.kernel.org
218
219������������������������������������������
220Documentation/translations/zh_CN/process/stable-kernel-rules.rst ���
221
222������������������������������������������������������������������������������������������������������������������
223���������������������������������������������������������������������������������������������������������API
224��������������� linux-api@vger.kernel.org ���
225
226
227������MIME���������������������������������������������������������������������
228------------------------------------------------------
229
230Linus ������������������������������������������������������������������������������������������������
231���������������������������������������������������������������������������������������������������
232������������������������������������
233
234������������������������������������������������������������������������������������������������������������������
235��������� ``git send-email`` ���https://git-send-email.io ��� ``git send-email``
236���������������������
237
238��������������������� ``git send-email`` ���
239
240.. warning::
241
242  ���������������������-���������������������������������������������������������������������������������
243
244���������������������MIME���������������������������������������������������������������������
245���������������������MIME���������������������������������������������������������������������������
246������������������������������MIME���������������������Linus������������������������������������
247���������������������������������������������
248
249���������������������������������������������������������������������������������MIME���������������������
250
251��������� Documentation/translations/zh_CN/process/email-clients.rst
252������������������������������������������������������������������������������������������
253
254������������������
255------------
256
257������������������������������������������������������������������������������������������������������������������
258������������������������������������������������������������������������������������������������������������������
259������������������������������������������������������������������������������������������������������������������
260������������������������������������������������������������������������
261
262������������������������������������������������������������������������������������������������������������������
263������������������������������������������������������������������������������������������������������������������
264������������������������������������������������������������������������ ``patch changelog`` ���������
265������������������������������������ :ref:`zh_the_canonical_patch_format` ������
266
267.. _tw_resend_reminders:
268
269������������������������
270----------------
271
272���������������������������������������������������������������������������������������������������
273
274������������������������������������������������������������������������������������������������������������������������
275������������������������������������������������������������������������������������������������������������
276������������������������������������������������������������������������������������������������������������������
277���������������������������
278
279���������������������������������RESEND������������������������������������::
280
281   [PATCH Vx RESEND] sub/sys: Condensed patch summary
282
283������������������������������������������������������������������RESEND������������RESEND������������������
284���������������������������������������������������
285
286��������������� PATCH
287----------------
288
289���������Linus���linux-kernel���������������������������������������������������������������[PATCH]
290���������������Linus������������������������������������������������������������������������������������
291
292``git send-email`` ������������������������
293
294���������������������������������������������
295------------------------------
296
297������������������������������������������������������������������������������������������������������������������
298���������������������������������������������������������sign-off���������������
299
300���������������������������������������������������������������������������������������������
301���������������������������������������������������������������������������������������������������������:
302
303��������������������� 1.1
304^^^^^^^^^^^^^^^^^^
305
306���������������������������������������������������
307
308       (a) ���������������������������������������������������������������������������������
309           ���������������������������������������������
310
311       (b) ������������������������������������������������������������������������������������������
312           ������������������������������������������������������������������������������������������������������������
313           ������������������������������������������������������������������������������������������������
314           ������������������������������������������������������
315
316       (c) ������������������������a���������b������������c���������������������������������
317           ������������������������
318
319       (d) ���������������������������������������������������������������������������������
320           ������������������������������������sign-off���������������������������������������������
321           ������������������������������������������������������
322
323������������������������::
324
325  Signed-off-by: Random J Developer <random@developer.example.org>
326
327������������������������������������������������������������������������������ ``git commit -s`` ������
328���������������������������������������������Signed-off-by������ ``git revert -s`` ������������������
329
330������������������������������������������������������������������������������������������������������������������
331������������������������������������������������������������������������������
332
333������������������������������������������Signed-off-by:'s������������������������������������������������
334������������������������������������������������������������������������������������Linus������������ **������**
335���������������������������������������������������������������
336
337������������Acked-by:���CC:������Co-Developed by:
338------------------------------------------
339
340Singed-off-by: ���������������������������������������������������������/���������������������������������
341
342������������������������������������������������������������������������������������������������������������/���������
343���������������������������������������������������������������Acked-by:���
344
345Acked-by: ������������������������������������������������������������������������������������������������������
346
347Acked-by: ���������������������������������������������������������������������������������������������������
348���������������������������������������Acker������Yep���looks good to me������������ Acked-By:������
349���������������������������������������������Ack������
350
351Acked-by������������������������������������������������������������������������������������������������������
352������������������������������������������Acked-By:������������������������������������������������������������
353������������������������������������������������������������������������������������������������
354
355������������������������������������������������������������������������������������������������������������������
356``Cc:`` ���������������������������������������������������������������������������������������������������
357������������������������������������������������������������������������������������������������
358
359Co-developed-by: ���������������������������������������������������������������������������������������
360���������������������������������������������From:������������������������������������Co-developed-by:
361���������������������������������Co-developed-by:���������������������������������������������������������
362������������������Singed-off-by:���������������������������������������������������������������������������
363���From:������Co-developed-by:������������������������������������������Singed-off-by:���������
364������������������������������
365
366���������������From:���������������������������������From:������������������������From:���������������������
367
368���From:���������������������������::
369
370	<changelog>
371
372	Co-developed-by: First Co-Author <first@coauthor.example.org>
373	Signed-off-by: First Co-Author <first@coauthor.example.org>
374	Co-developed-by: Second Co-Author <second@coauthor.example.org>
375	Signed-off-by: Second Co-Author <second@coauthor.example.org>
376	Signed-off-by: From Author <from@author.example.org>
377
378���������������������������������������::
379
380	From: From Author <from@author.example.org>
381
382	<changelog>
383
384	Co-developed-by: Random Co-Author <random@coauthor.example.org>
385	Signed-off-by: Random Co-Author <random@coauthor.example.org>
386	Signed-off-by: From Author <from@author.example.org>
387	Co-developed-by: Submitting Co-Author <sub@coauthor.example.org>
388	Signed-off-by: Submitting Co-Author <sub@coauthor.example.org>
389
390
391������Reported-by:���Tested-by:���Reviewed-by:���Suggested-by:���Fixes:
392-----------------------------------------------------------------
393
394Reported-by: ���������������������������������������������������������������������������������������������
395���������������������������bug���������������������������������������������Reported-by������������������
396���������������������������������Bug������������������������������������������������������
397
398Tested-by: ���������������������������������������������������������������������������������������������
399������������������������������������������������������������������������������������������������������������������������������������������
400
401Reviewed-by���������������������������������������������������������������������������������������������
402
403
404������������������������
405^^^^^^^^^^^^^^^^
406
407������������������Reviewed-by:���������������������
408
409        (a) ������������������������������������������������������������������������������������������
410            ������������������
411
412        (b) ���������������������������������������������������������������������������������������������
413            ������������������������������������
414
415        (c) ���������������������������������������������������������������������1������������
416            ���������������������������������2������������������������������������������������
417
418        (d) ������������������������������������������������������������������������������������������
419            ������������������������������������������������������������������������������������������
420            ������������������
421
422Reviewed-by������������������������������������������������������������������������������������������������
423������������������������������������������������������������������������������������������������Reviewed-by
424���������������������������������������������������������������������������������������������
425���Reviewed-by:���������������������������������������������������������������������������������������������
426���������������������������������
427
428���������������������������������������Tested-by���������Reviewed-by������������������������������������
429������������������������������������������������������������������������������������������������������������������
430���������������������������������������������������������������������������������������������������������������
431������ ``---`` ���������������������������������������������������������������������������
432
433Suggested-by: ������������������������������������������������������������������������������������������
434���������������������������������������������������������������������������������������������������������������
435���������������������������������������������������������������������������������������������������������������
436���������������
437
438Fixes: ������������������������������������������������������������������������������������������������������
439������������������������������������������������������������������������������������������������������������������
440������������������������������������������������������ :ref:`zh_describe_changes` ���������������������
441
442.. note::
443
444  ������Fixes:������������������������������������������������������������������������������������
445  stable@vger.kernel.org������������������������������������������
446  Documentation/translations/zh_CN/process/stable-kernel-rules.rst ���
447
448.. _tw_the_canonical_patch_format:
449
450������������������
451------------
452
453��������������������������������������������������������������������������������� ``Git`` ������������������
454������������ ``git format-patch`` ������������������������������������������������������������������
455���������������������������������������������������������
456
457���������������������������::
458
459    Subject: [PATCH 001/123] ���������:���������������
460
461������������������������������������������
462
463  - ������ ``from`` ���������������������������������������������������������������������������������������������
464
465  - ���������������������������75������������������������������������������������������������������
466
467  - ������������
468
469  - ��������� ``Signed-off-by:`` ���������������������������������������
470
471  - ��������� ``---`` ���������������
472
473  - ���������������������������������������������������
474
475  - ��������������� ``diff`` ������������
476
477������������������������������������������������������������������������������������������������������
478������������������������������������������������������������������������������������������������������������
479
480������������������������������������������������������������������������������
481
482������������������������������������������������������������������������������������������������
483���������������������������������������������������������������������������������������������������������
484������������������������������������������������������������������������
485
486������������������������������������������������������������������������������������������ ``git``
487���������������������������������������������������������������������������������������������������������
488���������������������������������������������������������������������������������������������������������
489��������������������������������������������� ``gitk`` ��� ``git log --oneline`` ������
490������������������������������������������������������������
491
492������������������������������������������70-75������������������������������������������������������
493������������������������������������������������������������������������������������������������������
494
495������������������������������������������������Subject: [PATCH <tag>...] <������>������������
496���������������������������������������������������������������������������������������������������������
497���������������������������������v1���v2���v3���������������������������������������������RFC������������
498���������������������������������������������������������������������������������������������������1/4���2/4���
4993/4���4/4���������������������������������������������������������������
500���������������������������������������������������������
501
502���������������������::
503
504    Subject: [patch 2/5] ext2: improve scalability of bitmap searching
505    Subject: [PATCHv2 001/207] x86: fix eflags tracking
506
507``From`` ������������������������������������������������������::
508
509        From: Patch Author <author@example.com>
510
511``From`` ��������������������������������������������������������������������������� ``From`` ���������
512������������������ ``From:`` ������������������������������������������������
513
514���������������������������������������������������������������������������������������������������������������
515���������������������������������������������������������������������������������������������������oops������
516���������������������������������������������������������������������������������������������������������������
517���������������������������������������������������������������������������������������������������������������
518��������������������� **������** ���
519
520��������������������������������������������������������������������������� *������* ���������������
521������������������������������������������������������������������������������������������������������������
522
523``---`` ������������������������������������������������������������������������������������������������
524������
525
526������ ``---`` ��������������������������������������������������������������� ``diffstat`` ������������
527������������������������������������������������������������������������ ``diffstat`` ���������������������
528������������������
529������ ``diffstat`` ��������� ``-p 1 -w 70`` ���������������������������������������������������������
530������������������������������������������������80���������������������������������������������
531��� ``git`` ������������������������diffstat������
532
533������������������������������������������������������������������������������������������������������������������
534��������������������������������������� ``������������������`` ������������v1���v2������������������������������
535
536������������������������������������������������������������������������ ``---`` ��� **������** ���������
537���������������������git���������������������������������������������������������������������������������������
538������������������������������������������������������������������������������������������������������������������
539������������������������������::
540
541  <commit message>
542  ...
543  Signed-off-by: Author <author@mail>
544  ---
545  V2 -> V3: Removed redundant helper function
546  V1 -> V2: Cleaned up coding style and addressed review comments
547
548  path/to/file | 5+++--
549  ...
550
551������������������������������������������������������������������������
552
553.. _tw_backtraces:
554
555���������������������������Backtraces���
556^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
557
558������������������������������������������������������������������������������������������������������������������
559������������������������������������������������������dmesg���������������������������������������������������
560������������������������������������������������
561
562������������������������������������������������������������������������������������������������������������������
563���������������������������������::
564
565  unchecked MSR access error: WRMSR to 0xd51 (tried to write 0x0000000000000064)
566  at rIP: 0xffffffffae059994 (native_write_msr+0x4/0x20)
567  Call Trace:
568  mba_wrmsr
569  update_domains
570  rdtgroup_mkdir
571
572.. _tw_explicit_in_reply_to:
573
574������������������������In-Reply-To���
575-----------------------------
576
577������������������������������������������In-Reply_To:��������������������������������� ``git send-email`` ������
578������������������������������������������������������������������bug������������������������������bug���������
579���������������������������������������������������������������������������������������������������������
580������������������������������������������������������������������������������������������������������������
581������������ https://lore.kernel.org/ ���������������������������������������������������������
582���������������������������������������
583
584���������������������
585--------------
586
587������������������������������������������������������������������������������������������������������������������
588���������������������������������������������������������������������������CI������������������������������������
589������������������������������������������������������������������������������������������
590
591��������������� ``git format-patch`` ������������������������������ ``--base`` ������������������
592������������������������������������������������������������������������������������������������::
593
594    $ git checkout -t -b my-topical-branch master
595    Branch 'my-topical-branch' set up to track local branch 'master'.
596    Switched to a new branch 'my-topical-branch'
597
598    [perform your edits and commits]
599
600    $ git format-patch --base=auto --cover-letter -o outgoing/ master
601    outgoing/0000-cover-letter.patch
602    outgoing/0001-First-Commit.patch
603    outgoing/...
604
605������������ ``outgoing/0000-cover-letter.patch`` ���������������������������������������������
606��� ``base-commit:`` ���������������������������CI���������������������������������������������
607``git am`` ���������������������::
608
609    $ git checkout -b patch-review [base-commit-id]
610    Switched to a new branch 'patch-review'
611    $ git am patches.mbox
612    Applying: First Commit
613    Applying: ...
614
615������������������������������������������ ``man git-format-patch`` ���
616
617.. note::
618
619    ``--base`` ������������2.9.0���git���������������
620
621������������������git��������������������������������������������� ``base-commit`` ���������������������
622������������������������������������������������������������������������������������������������������������������
623��������� ``---`` ������������������������������������������������������������������������������������
624
625������������
626--------
627
628Andrew Morton���������������������������tpp���
629  <https://www.ozlabs.org/~akpm/stuff/tpp.txt>
630
631Jeff Garzik������Linux���������������������������
632  <https://web.archive.org/web/20180829112450/http://linux.yyz.us/patch-format.html>
633
634Greg Kroah-Hartman������������������������������������������������
635  <http://www.kroah.com/log/linux/maintainer.html>
636
637  <http://www.kroah.com/log/linux/maintainer-02.html>
638
639  <http://www.kroah.com/log/linux/maintainer-03.html>
640
641  <http://www.kroah.com/log/linux/maintainer-04.html>
642
643  <http://www.kroah.com/log/linux/maintainer-05.html>
644
645  <http://www.kroah.com/log/linux/maintainer-06.html>
646
647������������������������������������������linux-kernel@vger.kernel.org���������������
648  <https://lore.kernel.org/r/20050711.125305.08322243.davem@davemloft.net>
649
650������ Documentation/translations/zh_CN/process/coding-style.rst
651
652Linus Torvalds���������������������������������
653  <https://lore.kernel.org/r/Pine.LNX.4.58.0504071023190.28951@ppc970.osdl.org>
654
655Andi Kleen���������������������������
656  ���������������������������������������������������������
657
658  http://halobates.de/on-submitting-patches.pdf
659
660