2. Get the source code
Mainline kernel tree
git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Staging tree
git clone git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
Checkout Documentation/process
3. Compile the kernel
make oldconfig
make -j2
4. Pull from staging-next and Create a branch
git branch -a
git branch staging-next
git checkout staging-next
git pull origin staging-next
git checkout -b new staging-next
5. Use checkpatch to find bugs and fix them
./scripts/checkpatch.pl -f drivers/staging/some_driver/some_file.c
6. Commit the changes
git diff
git add drivers/staging/some_driver/some_file.c
git commit -s -v
git log --oneline
7. Generate the patch
git format-patch staging-next..new
9. Find whom to send to
./scripts/get_maintainer.pl drivers/staging/some_driver/some_file.c
10. Send patch
git send-email --to someone@something.com --cc somelist@something.com your_patch.patch