本文将介绍:

  1. 使用checkpatch.pl来检查c代码文件是否符合linux内核规范;

checkpatch.pl

https://raw.githubusercontent.com/liujunming/Tools/master/checkpatch.pl

1
./checkpatch.pl -f --no-tree mychardriver.c

参考资料:

  1. How to use checkpatch.pl script for our own c files to validate coding style