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

Viewed 10000

I have written one sample chardriver. I want to verify that coding style is matching with linux kernel coding style or not.

I did this:

root@vkalyanam-Lenovo-B41-80:~/linux/scripts# ./checkpatch.pl --no-tree --fix mychardriver.c

ERROR: Does not appear to be a unified-diff format patch

total: 1 errors, 0 warnings, 0 lines checked

mychardriver.c has style problems, please review.

NOTE: If any of the errors are false positives, please report

them to the maintainer, see CHECKPATCH in MAINTAINERS.

Could you help me to resolve above error about unified-diff format patch. My exact requirement is to validate my own char driver file is matching with linux kernel coding style or not.

2 Answers
Related