From: Alexey Dobriyan <adobriyan@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, apw@canonical.com, joe@perches.com
Subject: [PATCH] checkpatch.pl: warn against using %Z
Date: Tue, 10 Jan 2017 02:59:55 +0300 [thread overview]
Message-ID: <20170109235955.GA6787@avx2> (raw)
In-Reply-To: <20170105160748.1f3696c51cd4e56de132243d@linux-foundation.org>
%Z is going to be removed in favour of %z.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.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);
next prev parent reply other threads:[~2017-01-09 22:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-03 23:01 [PATCH] lib/vsprintf.c: remove %Z support Alexey Dobriyan
2017-01-04 9:33 ` Andy Shevchenko
2017-01-10 0:05 ` Alexey Dobriyan
2017-01-06 0:07 ` Andrew Morton
2017-01-09 23:59 ` Alexey Dobriyan [this message]
2017-01-09 22:16 ` [PATCH] checkpatch.pl: warn against using %Z Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170109235955.GA6787@avx2 \
--to=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox