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.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -296,7 +296,7 @@ our $Float_int = qr{(?i)[0-9]+e-?[0-9]+[fl]?}; · 295 unmodified lines | ||
| 296 | 296 | our $Float = qr{$Float_hex|$Float_dec|$Float_int}; |
| 297 | 297 | our $Constant = qr{$Float|$Binary|$Octal|$Hex|$Int}; |
| 298 | 298 | our $Assignment = qr{\*\=|/=|%=|\+=|-=|<<=|>>=|&=|\^=|\|=|=}; |
| 299 | −our $Compare = qr{<=|>=|==|!=|<|>}; | |
| 299 | +our $Compare = qr{<=|>=|==|!=|<|(?<!-)>}; | |
| 300 | 300 | our $Arithmetic = qr{\+|-|\*|\/|%}; |
| 301 | 301 | our $Operators = qr{ |
| 302 | 302 | <=|>=|==|!=| |