Lindent is a script that changes the appearance of a C program according to linux kernel coding style. It can be found in linux/scripts/ and it makes use of indent.(see indent(1) manual page).
For a debian based distribution running Lindent is straightforward:
apt-get install indent
#run Lindent over a file
The preferred coding style used in linux kernel is described in linux/Documentation/CodingStyle.