There is a good illustration of "how to add syscalls to kernel" y given in Robert Love's book LKD, refer it.
when you attach files like these please follow a convention like naming them as mypatch.patch, mypatch.diff or even mypatch.txt. not all mail clients can read these files and may drop them.
Please DON'T top post, its annoying.
For coding standards please refer for coding style guide by Linus, its inside the Documentation directory inside the kernel source.
There are many utilities like
patchcheck.pl and indent, which can make your code more readable.
-A