diff options
author | Andy Whitcroft <apw@shadowen.org> | 2008-10-16 01:02:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 14:21:35 -0400 |
commit | 2a1bc5d5c5096f2dfb6f8b18f39ecb718f101535 (patch) | |
tree | 877a3ab1828a452f0592a58d0f171e2ffe86dc1a | |
parent | 9bd49efe4e4bf88d9c1026db50325fd1b2e59519 (diff) |
checkpatch: %Lx tests should hand %% as a literal
Ensure that we handle literal %'s correctly when adjacent to a %Lx.
%Lx bad
%%Lx good
%%%Lx bad
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rwxr-xr-x | scripts/checkpatch.pl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 6ddae89c3cfa..c7980ff2975e 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -2392,6 +2392,7 @@ sub process { | |||
2392 | my $string; | 2392 | my $string; |
2393 | while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) { | 2393 | while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) { |
2394 | $string = substr($rawline, $-[1], $+[1] - $-[1]); | 2394 | $string = substr($rawline, $-[1], $+[1] - $-[1]); |
2395 | $string =~ s/%%/__/g; | ||
2395 | if ($string =~ /(?<!%)%L[udi]/) { | 2396 | if ($string =~ /(?<!%)%L[udi]/) { |
2396 | WARN("\%Ld/%Lu are not-standard C, use %lld/%llu\n" . $herecurr); | 2397 | WARN("\%Ld/%Lu are not-standard C, use %lld/%llu\n" . $herecurr); |
2397 | last; | 2398 | last; |