lkml.org 
[lkml]   [2020]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] checkpatch: ignore CamelCase for inttypes.h format specifiers
Date
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
\
 
 \ /
  Last update: 2020-06-10 22:33    [W:0.492 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site