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

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 <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
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);
Supports Markdown
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