10 Commits

Author SHA1 Message Date
Ryusuke Konishi
6d624049e3 checkpatch: handle output functions with "_()" macro
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>
2016-07-24 02:15:51 +09:00
Ryusuke Konishi
4e19ae4c48 checkpatch: add user space output functions to logFunctions
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>
2016-07-24 02:15:51 +09:00
Sam Bobroff
fccc840c3d checkpatch: improve operator spacing check
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>
2016-07-24 01:52:38 +09:00
Zhao Lei
29e131a099 scripts/spelling.txt: add some typo-words
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>
2016-02-13 02:17:57 +09:00
Sudip Mukherjee
e6e2353741 scripts/spelling.txt: spelling of uninitialized
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>
2016-02-13 02:17:41 +09:00
Maninder Singh
b872eb5e45 scripts/spelling.txt: add misspelled words for check
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>
2016-02-13 02:17:20 +09:00
Jani Nikula
5c5fb59c08 checkpatch: spell check reudce
References: http://mid.gmane.org/1424977312-24902-1-git-send-email-ville.syrjala@linux.intel.com

Signed-off-by: Jani Nikula <jani.nikula@intel.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>
2016-02-13 02:17:06 +09:00
Ryusuke Konishi
e8f51bea68 scripts/checkpatch.pl: import updates from Linux-4.0 kernel
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>
2015-05-04 10:15:15 +09:00
Ryusuke Konishi
9de0794363 nilfs-utils: fix build of dist archives
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>
2014-01-27 02:53:24 +09:00
Ryusuke Konishi
9632a94354 nilfs-utils: add checkpatch script
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>
2013-12-01 16:21:53 +09:00