[dpdk-dev] [PATCH] devtools: add llx format specifier check

Ferruh Yigit ferruh.yigit at intel.com
Tue Feb 9 16:26:43 CET 2021


%llx tends to be wrong when used for fixed size, like uint64_t,
variables, adding a warning to double check them.

Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
Cc: David Marchand <david.marchand at redhat.com>
Cc: Aaron Conole <aconole at redhat.com>
---
 devtools/checkpatches.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 78a408ef9823..68005389820a 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -118,6 +118,14 @@ check_forbidden_additions() { # <patch>
 		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
 		"$1" || res=1
 
+	# check %llx usage
+	awk -v FOLDERS='lib drivers app examples' \
+		-v EXPRESSIONS='%ll*[xud]' \
+		-v RET_ON_FAIL=1 \
+		-v MESSAGE='Please check %llx usage which tends to be wrong most of the times' \
+		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
+		"$1" || res=1
+
 	# svg figures must be included with wildcard extension
 	# because of png conversion for pdf docs
 	awk -v FOLDERS='doc' \
-- 
2.29.2



More information about the dev mailing list