diff options
author | Joe Perches <joe@perches.com> | 2012-12-17 19:02:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 20:15:19 -0500 |
commit | 6b7eaf6e1428be33f731287de963862e3846cd42 (patch) | |
tree | 19628f1233f2e758cbd138d1c7a2d41701244b32 /scripts | |
parent | d1e2ad07e78c4bbac9fce4d2e3c0fe60bce091d8 (diff) |
checkpatch: find hex constants as a single IDENT
Hexadecimal values are current found in 2 parts. A hex constant like
0x123456abcdef is found as 0 and then x123456abcdef and later coalesced.
Instead, reverse the order of the 2 searches in $Constant to find 0x
first, then 0 so that the entire hex constant is found all at once.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 725c59611e97..8cb9bfc7c14f 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -230,7 +230,7 @@ our $Inline = qr{inline|__always_inline|noinline}; | |||
230 | our $Member = qr{->$Ident|\.$Ident|\[[^]]*\]}; | 230 | our $Member = qr{->$Ident|\.$Ident|\[[^]]*\]}; |
231 | our $Lval = qr{$Ident(?:$Member)*}; | 231 | our $Lval = qr{$Ident(?:$Member)*}; |
232 | 232 | ||
233 | our $Constant = qr{(?i:(?:[0-9]+|0x[0-9a-f]+)[ul]*)}; | 233 | our $Constant = qr{(?i:(?:0x[0-9a-f]+|[0-9]+)[ul]*)}; |
234 | our $Assignment = qr{(?:\*\=|/=|%=|\+=|-=|<<=|>>=|&=|\^=|\|=|=)}; | 234 | our $Assignment = qr{(?:\*\=|/=|%=|\+=|-=|<<=|>>=|&=|\^=|\|=|=)}; |
235 | our $Compare = qr{<=|>=|==|!=|<|>}; | 235 | our $Compare = qr{<=|>=|==|!=|<|>}; |
236 | our $Operators = qr{ | 236 | our $Operators = qr{ |