mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
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>
This commit is contained in:
parent
b598b67060
commit
d7fe8065ad
1 changed files with 1 additions and 1 deletions
|
|
@ -3652,7 +3652,7 @@ sub process {
|
|||
|
||||
# Ignore operators passed as parameters.
|
||||
if ($op_type ne 'V' &&
|
||||
$ca =~ /\s$/ && $cc =~ /^\s*,/) {
|
||||
$ca =~ /\s$/ && $cc =~ /^\s*[,\)]/) {
|
||||
|
||||
# # Ignore comments
|
||||
# } elsif ($op =~ /^$;+$/) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue