What coding style should I use?
If you are working on a new piece of code, you should follow the coding style from the file Documentation/CodingStyle in your kernel source directory.
When working on an existing piece of code, follow the coding style from that code. After you edit a file, a reader should not be able to tell just from coding style which parts you worked on.
What do I do if my patch got rejected due to the coding style?
(answer lifted from a [http://cm.bell-labs.com/wiki/plan9/How_to_contribute/index.html Plan9 wiki])
The patch may well come back in the "sorry" category rather than the "applied" category, with suggestions on what should be changed to make it better and a request to resubmit it. This doesn't mean you should give up. It means you did a good job and the maintainers think it's worth trying to get you to make the job even better. Remember: you can't polish a turd.