Fix error in checkpatch.pl errors due to use of deprecated unescaped
left braces in perl regular expressions.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Suppress the checkpatch warning "WARNING: line over 80 characters" for
output functions with "_()" macro.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Handle user space output functions as logFunctions and do not emit the
warning "WARNING: line over 80 characters" against them.
The following functions are supported:
- printf(), fprintf(), sprintf(), and their variants.
- perror().
- syslog() and vsyslog().
- err(), warn(), and their variants.
- private output functions including *_printf(), myprintf(), die(),
error(), and *_logger().
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Code such as:
x = timercmp(&now, &end, <);
Will currently trigger a checkpatch error. e.g.
ERROR: spaces required around that '<'
This is because the "Ignore operators passed as parameters" check looks
only for a comma following the operator. Improve the check by also
looking for a close parenthesis.
Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
I wrote a small script to show word-pair from all linux spelling-typo
commits, and get following result by sort | uniq -c:
181 occured -> occurred
78 transfered -> transferred
67 recieved -> received
65 dependant -> dependent
58 wether -> whether
56 accomodate -> accommodate
54 occured -> occurred
51 recieve -> receive
47 cant -> can't
40 sucessfully -> successfully
...
Some of them are not in spelling.txt, this patch adds the most common
word-pairs into spelling.txt.
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
I just did a spelling mistake of uninitialized and wrote that as
unintialized. Fortunately I noticed it in my final review.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
misspelled words for check:-
chcek
chck
cehck
I myself did these spell mistakes in changelog for patches, Thus
suggesting to add in spelling.txt, so that checkpatch.pl warns it
earlier. References:-
./arch/powerpc/kernel/exceptions-64e.S:456: . . . make sure you chcek
https://lkml.org/lkml/2015/6/25/289
./arch/x86/mm/pageattr.c:1368: * No need to cehck in that case
[akpm@linux-foundation.org: add whcih->which, whcih I always get wrong]
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Backport changes from scripts/checkpatch.pl in kernel v4.0 and add
spelling.txt to enable the spell-check feature that the new
checkpatch.pl supported.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
The following files are missing in the archive files generated by
"make dist-*":
- .gitignore files
- autogen.sh script
- checkpatch.pl script
This fixes the issue.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
This import checkpatch script from a linux kernel and adds description
of patch submission rules to README file.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>