[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170109235955.GA6787@avx2>
Date: Tue, 10 Jan 2017 02:59:55 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, apw@...onical.com, joe@...ches.com
Subject: [PATCH] checkpatch.pl: warn against using %Z
%Z is going to be removed in favour of %z.
Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
---
scripts/checkpatch.pl | 6 ++++++
1 file changed, 6 insertions(+)
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5189,6 +5189,12 @@ sub process {
"\%Ld/%Lu are not-standard C, use %lld/%llu\n" . $herecurr);
last;
}
+ # check for %Z
+ if ($string =~ /(?<!%)%[\*\d\.\$]*Z[diouxX]/) {
+ WARN("PRINTF_Z",
+ "%Z is non-standard C, use %z\n" . $herecurr);
+ last;
+ }
if ($string =~ /0x%[\*\d\.\$\Llzth]*[udi]/) {
ERROR("PRINTF_0xDECIMAL",
"Prefixing 0x with decimal output is defective\n" . $herecurr);
Powered by blists - more mailing lists