From: Joe Perches Date: Wed, 9 Sep 2015 22:37:47 +0000 (-0700) Subject: checkpatch: emit an error on formats with 0x% X-Git-Tag: v4.3-rc1~22^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e30075742316a1d72b7e8f794f6e0bd44d774e2;p=platform%2Fkernel%2Flinux-exynos.git checkpatch: emit an error on formats with 0x% Using 0x%d is wrong. Emit a message when it happens. Miscellanea: Improve the %Lu warning to match formats like %16Lu. Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 41ecae8..d98ffdd 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4816,16 +4816,20 @@ sub process { "Consecutive strings are generally better as a single string\n" . $herecurr); } -# check for %L{u,d,i} in strings +# check for %L{u,d,i} and 0x%[udi] in strings my $string; while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) { $string = substr($rawline, $-[1], $+[1] - $-[1]); $string =~ s/%%/__/g; - if ($string =~ /(?