mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 16:53:54 +08:00
checkpatch: fix jiffies comparison and others
checkpatch could not distinguish between a variable in a struct named jiffies and the normal jiffies. foo->jiffies would emit a "Comparing jiffies" arning. Update the $Compare variable to do a negative look-behind for "-" when finding a ">" so that a pointer dereference like -> isn't a comparison. Signed-off-by: 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
6c8bd7076d
commit
447432f323
@ -296,7 +296,7 @@ our $Float_int = qr{(?i)[0-9]+e-?[0-9]+[fl]?};
|
||||
our $Float = qr{$Float_hex|$Float_dec|$Float_int};
|
||||
our $Constant = qr{$Float|$Binary|$Octal|$Hex|$Int};
|
||||
our $Assignment = qr{\*\=|/=|%=|\+=|-=|<<=|>>=|&=|\^=|\|=|=};
|
||||
our $Compare = qr{<=|>=|==|!=|<|>};
|
||||
our $Compare = qr{<=|>=|==|!=|<|(?<!-)>};
|
||||
our $Arithmetic = qr{\+|-|\*|\/|%};
|
||||
our $Operators = qr{
|
||||
<=|>=|==|!=|
|
||||
|
Loading…
Reference in New Issue
Block a user