6 Commits

Author SHA1 Message Date
Ryusuke Konishi
647d012dcf checkpatch: fix perl errors due to unescaped left braces in regex
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>
2024-02-05 01:53:34 +09:00
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
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
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