From: Scott Branden <scott.branden@broadcom.com>
To: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>
Cc: BCM Kernel Feedback <bcm-kernel-feedback-list@broadcom.com>,
linux-kernel@vger.kernel.org,
Scott Branden <scott.branden@broadcom.com>
Subject: [PATCH] checkpatch: ignore CamelCase for inttypes.h format specifiers
Date: Wed, 10 Jun 2020 13:33:07 -0700 [thread overview]
Message-ID: <20200610203307.9344-1-scott.branden@broadcom.com> (raw)
Ignore CamelCase for inttypes.h for fixed integer types format specifiers.
(ex. PRIx32 for uint32_t).
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
---
scripts/checkpatch.pl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 899e380782c0..9fa90457b270 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5157,6 +5157,8 @@ sub process {
$var =~ /[A-Z][a-z]|[a-z][A-Z]/ &&
#Ignore Page<foo> variants
$var !~ /^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ &&
+#Ignore inttypes.h scanf/printf format specifiers for fixed size integer types
+ $var !~ /^(?:PRI|SCN)[dxoui](8|16|32|64|PTR|MAX)?$/ &&
#Ignore SI style variants like nS, mV and dB
#(ie: max_uV, regulator_min_uA_show, RANGE_mA_VALUE)
$var !~ /^(?:[a-z0-9_]*|[A-Z0-9_]*)?_?[a-z][A-Z](?:_[a-z0-9_]+|_[A-Z0-9_]+)?$/ &&
--
2.17.1
next reply other threads:[~2020-06-10 20:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-10 20:33 Scott Branden [this message]
2020-06-10 21:09 ` Joe Perches
2020-06-10 21:48 ` Scott Branden
2020-06-10 22:22 ` Joe Perches
2020-06-10 23:22 ` Scott Branden
2020-06-11 6:01 ` Scott Branden
2020-06-11 6:32 ` 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=20200610203307.9344-1-scott.branden@broadcom.com \
--to=scott.branden@broadcom.com \
--cc=apw@canonical.com \
--cc=bcm-kernel-feedback-list@broadcom.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
all inboxes | Powered by JetHome®