SlideShare ist ein Scribd-Unternehmen logo
1 von 21
演讲人:Chen Li
<chenli@uniontech.com>
打造操作系统创新生态
Participate in the Linux Community
—— A Guide To The Kernel Development Process and tools
01 powerful git tricks
02 Modern code navigation without
TAGS
04 Send and update your patch
03 Mailing list and mail client
目
录
Basic git concepts
plumbing porcelain object
database
index
working
tree
object type branch tag
head/HEA
D
merge rebase bisect
git worktree --help
What How
Example Why
Worktree is your working directory without index and
object database
- git worktree add
- git worktree remove
- git worktree list
- git worktree move
…
Share the same project-wise git config
Share the same remotes
Easily manage different worktrees
Avoid frequently but annoying git checkout/switch
$ git worktree add -b emergency-fix ../temp
master
$ pushd ../temp
# ... hack hack hack ...
$ git commit -a -m 'emergency fix for boss'
$ popd
$ git worktree remove ../temp
Package your git repo!
Git bundle and archive
Git archive
Git bundle
Move objects and refs by
archive
Hisotry is also included
Create an archive of files
from a named tree
Play well with all git worktrees
and git clone!
History is excluded
git bundle create 4-19-
90.bundle 4-19-90
git archive -o 4-19-90.zip 4-
19-90 -9
Make clean is not required!
Commit meeage or diff
Search something in git log
--grep
-S -G
Git hooks
firstlove@LAPTOP-N1A5G5V0 ~/p/k/linux-sw (6a-inspur-wutip-421)> cat
.git/hooks/post-commit
exec git show --format=email HEAD | ./scripts/checkpatch.pl --strict --codespell
fire off custom scripts when
certain important actions occur.
Why ctags
Modern code navigation without TAGS
efficient Simple
Most kernel
developer use it
Universal
It is really fast even on machine with
performance
Works quite well with vanilla vim!
So, you can easily learn ctags from them
Have many languages support by default
Why not ctags
Modern code navigation without TAGS
Lack on the fly syntax
check
Code completion is
missing or unusable
Know nothing about
how your code will be
compiled
No other modern ide
features!
You cannot know if it can pass compliation until you
really compile it!
It has to index all codes, regardless of .config!
That’s why its ofter Inaccurate even just for code
navigation!
● codelen
● symbol rename
● semantic highlighting
● hierarchies
Cannot take use of other powerful lints!
Kernel is really big, it’s not pritical to remember all
apis.
Code completion is really your friend if you are a
newbiee.
Modern code navigation without TAGS
ccls
c/c++/object-c lsp server, which supports all features mentioned last page
Have nearly all editors support, including vim, emacs, neovim, vscode ...
Mailing list and mail client
1,000 messages
each day
Emails Only (without
anything else!)
Simple but sufficient
Poor man’s forum
LKML
Mailing list and mail client
git-send-email Mutt
mu4e
nmh
Mail client
Mailing list and mail client
smtp imap
refile
archive
Mail client
Send and update your patch
Describe, check and extract your patch (single patch)
./scripts/checkpatch.pl -g HEAD
git format-patch -1 HEAD
Send and update your patch
Describe, check and extract your patch (multiple patches)
# n is your commits number
$ ./scripts/checkpatch.pl -g HEAD-n
$ git format-patch -n HEAD
$ man git-format-patch # for more details
Send and update your patch
Get maintainer and mailing list
$ ./scripts/get_maintainer.pl drivers/gpu/drm/radeon/atom.c
Alex Deucher <alexander.deucher@amd.com>
(supporter:RADEON and AMDGPU DRM DRIVERS)
"Christian König" <christian.koenig@amd.com>
(supporter:RADEON and AMDGPU DRM DRIVERS)
David Airlie <airlied@linux.ie> (maintainer:DRM DRIVERS)
Daniel Vetter <daniel@ffwll.ch> (maintainer:DRM DRIVERS)
amd-gfx@lists.freedesktop.org (open list:RADEON and
AMDGPU DRM DRIVERS)
dri-devel@lists.freedesktop.org (open list:DRM DRIVERS)
linux-kernel@vger.kernel.org (open list)
Send and update your patch
Update your patch
It’s quite common that your first version of patch/patches have
problems you were not aware of. Maintainer(or someone else)
may reply your mail and point out your mistakes.
You can fix/improve your patch/patches then send v2/v3/v4/...:
$ git format-patch … –reroll-count n # n stands for the n times
you send the patch/patches
$ Add changelog in cover-letter
Send and update your patch
Update your patch
Example of changelog inside cover-letter:
Signed-off-by: chenli <chenli at uniontech.com>
---
v1->v2:
* Convert the other assignments of msg as well.
* Casting types to avoid static checker warnings.
---
drivers/gpu/drm/radeon/radeon_uvd.c | 34 ++++++++++++++---------------
1 file changed, 17 insertions(+), 17 deletions(-)
https://www.spinics.net/lists/amd-gfx/msg59986.html
Send and update your patch
Fix other commits
Add: “Fixes:” tag in the commit
message:
Fixes: 3fcb4f01deed ("drm/radeon: Use
kvmalloc for CS chunks")
Signed-off-by: Chen Li
<chenli@xxxxxxxxxxxxx>
---
changelog:
v1->v2: add Fixes: tag
drivers/gpu/drm/radeon/radeon_cs.c | 6 +++--
-
1 file changed, 3 insertions(+), 3 deletions(-)
https://www.spinics.net/lists/amd-
gfx/msg59986.html
If your commits aim to fix bug introduced from other commits, you should:
Any question
Thanks For Listening
感谢聆听

Weitere ähnliche Inhalte

Was ist angesagt?

Testing curl for security
Testing curl for securityTesting curl for security
Testing curl for securityDaniel Stenberg
 
Source Code Management systems
Source Code Management systemsSource Code Management systems
Source Code Management systemsxSawyer
 
Fluentd and PHP
Fluentd and PHPFluentd and PHP
Fluentd and PHPchobi e
 
Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with GitThings Lab
 
AppDays Pordenone 2014: Web App Engineering With Dart
AppDays Pordenone 2014: Web App Engineering With DartAppDays Pordenone 2014: Web App Engineering With Dart
AppDays Pordenone 2014: Web App Engineering With DartClaudio d'Angelis
 
Deconstruct 2017: All programmers MUST learn C and Assembly
Deconstruct 2017: All programmers MUST learn C and AssemblyDeconstruct 2017: All programmers MUST learn C and Assembly
Deconstruct 2017: All programmers MUST learn C and Assemblyice799
 
Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015ice799
 
An introduction to git
An introduction to gitAn introduction to git
An introduction to gitolberger
 
Php core. get rid of bugs and contribute
Php core. get rid of bugs and contributePhp core. get rid of bugs and contribute
Php core. get rid of bugs and contributePierre Joye
 
kikstart journey of Golang with Hello world - Gopherlabs
kikstart journey of Golang with Hello world - Gopherlabs kikstart journey of Golang with Hello world - Gopherlabs
kikstart journey of Golang with Hello world - Gopherlabs sangam biradar
 
Functional Programming with Streams in node.js
Functional Programming with Streams in node.jsFunctional Programming with Streams in node.js
Functional Programming with Streams in node.jsAdam Crabtree
 
Http3 fullstackfest-2019
Http3 fullstackfest-2019Http3 fullstackfest-2019
Http3 fullstackfest-2019Daniel Stenberg
 

Was ist angesagt? (20)

Testing curl for security
Testing curl for securityTesting curl for security
Testing curl for security
 
Source Code Management systems
Source Code Management systemsSource Code Management systems
Source Code Management systems
 
HTTP/3 in curl
HTTP/3 in curlHTTP/3 in curl
HTTP/3 in curl
 
HTTP/3 for everyone
HTTP/3 for everyoneHTTP/3 for everyone
HTTP/3 for everyone
 
Landing code in curl
Landing code in curlLanding code in curl
Landing code in curl
 
Fluentd and PHP
Fluentd and PHPFluentd and PHP
Fluentd and PHP
 
Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with Git
 
DNS over HTTPS
DNS over HTTPSDNS over HTTPS
DNS over HTTPS
 
AppDays Pordenone 2014: Web App Engineering With Dart
AppDays Pordenone 2014: Web App Engineering With DartAppDays Pordenone 2014: Web App Engineering With Dart
AppDays Pordenone 2014: Web App Engineering With Dart
 
Deconstruct 2017: All programmers MUST learn C and Assembly
Deconstruct 2017: All programmers MUST learn C and AssemblyDeconstruct 2017: All programmers MUST learn C and Assembly
Deconstruct 2017: All programmers MUST learn C and Assembly
 
Docker and Fluentd
Docker and FluentdDocker and Fluentd
Docker and Fluentd
 
Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015
 
curl better
curl bettercurl better
curl better
 
An introduction to git
An introduction to gitAn introduction to git
An introduction to git
 
Php core. get rid of bugs and contribute
Php core. get rid of bugs and contributePhp core. get rid of bugs and contribute
Php core. get rid of bugs and contribute
 
curl roadmap 2020
curl roadmap 2020curl roadmap 2020
curl roadmap 2020
 
kikstart journey of Golang with Hello world - Gopherlabs
kikstart journey of Golang with Hello world - Gopherlabs kikstart journey of Golang with Hello world - Gopherlabs
kikstart journey of Golang with Hello world - Gopherlabs
 
Functional Programming with Streams in node.js
Functional Programming with Streams in node.jsFunctional Programming with Streams in node.js
Functional Programming with Streams in node.js
 
Linux CLI
Linux CLILinux CLI
Linux CLI
 
Http3 fullstackfest-2019
Http3 fullstackfest-2019Http3 fullstackfest-2019
Http3 fullstackfest-2019
 

Ähnlich wie Chenli linux-kerne-community

Gerrit linuxtag2011
Gerrit linuxtag2011Gerrit linuxtag2011
Gerrit linuxtag2011thkoch
 
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devsITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devsITCamp
 
the productive programer: mechanics
the productive programer: mechanicsthe productive programer: mechanics
the productive programer: mechanicselliando dias
 
Introduction to Git for developers
Introduction to Git for developersIntroduction to Git for developers
Introduction to Git for developersDmitry Guyvoronsky
 
Git_tutorial.pdf
Git_tutorial.pdfGit_tutorial.pdf
Git_tutorial.pdfAliaaTarek5
 
Life of a Chromium Developer
Life of a Chromium DeveloperLife of a Chromium Developer
Life of a Chromium Developermpaproductions
 
Alexander Kutsan: “C++ compilation boost”
Alexander Kutsan: “C++ compilation boost” Alexander Kutsan: “C++ compilation boost”
Alexander Kutsan: “C++ compilation boost” LogeekNightUkraine
 
Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil CholewińskiPilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil CholewińskiPilot
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git RightSven Peters
 
Amazing KDE (K Desktop Environment)
Amazing KDE (K Desktop Environment)Amazing KDE (K Desktop Environment)
Amazing KDE (K Desktop Environment)anandvaidya
 
Systemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveSystemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveAlison Chaiken
 
Git 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizationsGit 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizationsIan Walls
 
Systemd for developers
Systemd for developersSystemd for developers
Systemd for developersAlison Chaiken
 
Presentation for git jira and linux
Presentation for git jira and linuxPresentation for git jira and linux
Presentation for git jira and linuxdkylko1
 
Practical git for developers
Practical git for developersPractical git for developers
Practical git for developersWim Godden
 
Version Control ThinkVitamin
Version Control ThinkVitaminVersion Control ThinkVitamin
Version Control ThinkVitaminAlex Hillman
 
DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet IntroductionWei Sun
 
Docker interview Questions-3.pdf
Docker interview Questions-3.pdfDocker interview Questions-3.pdf
Docker interview Questions-3.pdfYogeshwaran R
 
Makefile
MakefileMakefile
MakefileIonela
 
Some wonderful Linux softwares for daily use
Some wonderful Linux softwares for daily useSome wonderful Linux softwares for daily use
Some wonderful Linux softwares for daily usearun.arwachin
 

Ähnlich wie Chenli linux-kerne-community (20)

Gerrit linuxtag2011
Gerrit linuxtag2011Gerrit linuxtag2011
Gerrit linuxtag2011
 
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devsITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
ITCamp 2013 - Alessandro Pilotti - Git crash course for Visual Studio devs
 
the productive programer: mechanics
the productive programer: mechanicsthe productive programer: mechanics
the productive programer: mechanics
 
Introduction to Git for developers
Introduction to Git for developersIntroduction to Git for developers
Introduction to Git for developers
 
Git_tutorial.pdf
Git_tutorial.pdfGit_tutorial.pdf
Git_tutorial.pdf
 
Life of a Chromium Developer
Life of a Chromium DeveloperLife of a Chromium Developer
Life of a Chromium Developer
 
Alexander Kutsan: “C++ compilation boost”
Alexander Kutsan: “C++ compilation boost” Alexander Kutsan: “C++ compilation boost”
Alexander Kutsan: “C++ compilation boost”
 
Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil CholewińskiPilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git Right
 
Amazing KDE (K Desktop Environment)
Amazing KDE (K Desktop Environment)Amazing KDE (K Desktop Environment)
Amazing KDE (K Desktop Environment)
 
Systemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveSystemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to love
 
Git 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizationsGit 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizations
 
Systemd for developers
Systemd for developersSystemd for developers
Systemd for developers
 
Presentation for git jira and linux
Presentation for git jira and linuxPresentation for git jira and linux
Presentation for git jira and linux
 
Practical git for developers
Practical git for developersPractical git for developers
Practical git for developers
 
Version Control ThinkVitamin
Version Control ThinkVitaminVersion Control ThinkVitamin
Version Control ThinkVitamin
 
DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet Introduction
 
Docker interview Questions-3.pdf
Docker interview Questions-3.pdfDocker interview Questions-3.pdf
Docker interview Questions-3.pdf
 
Makefile
MakefileMakefile
Makefile
 
Some wonderful Linux softwares for daily use
Some wonderful Linux softwares for daily useSome wonderful Linux softwares for daily use
Some wonderful Linux softwares for daily use
 

Kürzlich hochgeladen

(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 

Kürzlich hochgeladen (20)

(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 

Chenli linux-kerne-community

  • 1. 演讲人:Chen Li <chenli@uniontech.com> 打造操作系统创新生态 Participate in the Linux Community —— A Guide To The Kernel Development Process and tools
  • 2. 01 powerful git tricks 02 Modern code navigation without TAGS 04 Send and update your patch 03 Mailing list and mail client 目 录
  • 3. Basic git concepts plumbing porcelain object database index working tree object type branch tag head/HEA D merge rebase bisect
  • 4. git worktree --help What How Example Why Worktree is your working directory without index and object database - git worktree add - git worktree remove - git worktree list - git worktree move … Share the same project-wise git config Share the same remotes Easily manage different worktrees Avoid frequently but annoying git checkout/switch $ git worktree add -b emergency-fix ../temp master $ pushd ../temp # ... hack hack hack ... $ git commit -a -m 'emergency fix for boss' $ popd $ git worktree remove ../temp
  • 5. Package your git repo! Git bundle and archive Git archive Git bundle Move objects and refs by archive Hisotry is also included Create an archive of files from a named tree Play well with all git worktrees and git clone! History is excluded git bundle create 4-19- 90.bundle 4-19-90 git archive -o 4-19-90.zip 4- 19-90 -9 Make clean is not required!
  • 6. Commit meeage or diff Search something in git log --grep -S -G
  • 7. Git hooks firstlove@LAPTOP-N1A5G5V0 ~/p/k/linux-sw (6a-inspur-wutip-421)> cat .git/hooks/post-commit exec git show --format=email HEAD | ./scripts/checkpatch.pl --strict --codespell fire off custom scripts when certain important actions occur.
  • 8. Why ctags Modern code navigation without TAGS efficient Simple Most kernel developer use it Universal It is really fast even on machine with performance Works quite well with vanilla vim! So, you can easily learn ctags from them Have many languages support by default
  • 9. Why not ctags Modern code navigation without TAGS Lack on the fly syntax check Code completion is missing or unusable Know nothing about how your code will be compiled No other modern ide features! You cannot know if it can pass compliation until you really compile it! It has to index all codes, regardless of .config! That’s why its ofter Inaccurate even just for code navigation! ● codelen ● symbol rename ● semantic highlighting ● hierarchies Cannot take use of other powerful lints! Kernel is really big, it’s not pritical to remember all apis. Code completion is really your friend if you are a newbiee.
  • 10. Modern code navigation without TAGS ccls c/c++/object-c lsp server, which supports all features mentioned last page Have nearly all editors support, including vim, emacs, neovim, vscode ...
  • 11. Mailing list and mail client 1,000 messages each day Emails Only (without anything else!) Simple but sufficient Poor man’s forum LKML
  • 12. Mailing list and mail client git-send-email Mutt mu4e nmh Mail client
  • 13. Mailing list and mail client smtp imap refile archive Mail client
  • 14. Send and update your patch Describe, check and extract your patch (single patch) ./scripts/checkpatch.pl -g HEAD git format-patch -1 HEAD
  • 15. Send and update your patch Describe, check and extract your patch (multiple patches) # n is your commits number $ ./scripts/checkpatch.pl -g HEAD-n $ git format-patch -n HEAD $ man git-format-patch # for more details
  • 16. Send and update your patch Get maintainer and mailing list $ ./scripts/get_maintainer.pl drivers/gpu/drm/radeon/atom.c Alex Deucher <alexander.deucher@amd.com> (supporter:RADEON and AMDGPU DRM DRIVERS) "Christian König" <christian.koenig@amd.com> (supporter:RADEON and AMDGPU DRM DRIVERS) David Airlie <airlied@linux.ie> (maintainer:DRM DRIVERS) Daniel Vetter <daniel@ffwll.ch> (maintainer:DRM DRIVERS) amd-gfx@lists.freedesktop.org (open list:RADEON and AMDGPU DRM DRIVERS) dri-devel@lists.freedesktop.org (open list:DRM DRIVERS) linux-kernel@vger.kernel.org (open list)
  • 17. Send and update your patch Update your patch It’s quite common that your first version of patch/patches have problems you were not aware of. Maintainer(or someone else) may reply your mail and point out your mistakes. You can fix/improve your patch/patches then send v2/v3/v4/...: $ git format-patch … –reroll-count n # n stands for the n times you send the patch/patches $ Add changelog in cover-letter
  • 18. Send and update your patch Update your patch Example of changelog inside cover-letter: Signed-off-by: chenli <chenli at uniontech.com> --- v1->v2: * Convert the other assignments of msg as well. * Casting types to avoid static checker warnings. --- drivers/gpu/drm/radeon/radeon_uvd.c | 34 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) https://www.spinics.net/lists/amd-gfx/msg59986.html
  • 19. Send and update your patch Fix other commits Add: “Fixes:” tag in the commit message: Fixes: 3fcb4f01deed ("drm/radeon: Use kvmalloc for CS chunks") Signed-off-by: Chen Li <chenli@xxxxxxxxxxxxx> --- changelog: v1->v2: add Fixes: tag drivers/gpu/drm/radeon/radeon_cs.c | 6 +++-- - 1 file changed, 3 insertions(+), 3 deletions(-) https://www.spinics.net/lists/amd- gfx/msg59986.html If your commits aim to fix bug introduced from other commits, you should: