From 2a1bc5d5c5096f2dfb6f8b18f39ecb718f101535 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Wed, 15 Oct 2008 22:02:23 -0700 Subject: [PATCH] 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) 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 { my $string; while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) { $string = substr($rawline, $-[1], $+[1] - $-[1]); + $string =~ s/%%/__/g; if ($string =~ /(?