Commit 2a1bc5d5 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Linus Torvalds

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: default avatarAndy Whitcroft <apw@shadowen.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9bd49efe
......@@ -2392,6 +2392,7 @@ sub process {
my $string;
while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
$string = substr($rawline, $-[1], $+[1] - $-[1]);
$string =~ s/%%/__/g;
if ($string =~ /(?<!%)%L[udi]/) {
WARN("\%Ld/%Lu are not-standard C, use %lld/%llu\n" . $herecurr);
last;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment