X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=devtools%2Fcheckpatches.sh;h=c314d83a29d3196d9e8b854d64984d45cf64ff1c;hb=167978c1678fc5fd525e4e731de4c00093aee129;hp=ba43f84e64827b8009baa1cc5533ea9e0e71d677;hpb=701f9f156b33d54b642cf80791e40d6ebbde082f;p=dpdk.git diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index ba43f84e64..c314d83a29 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -69,6 +69,14 @@ check_forbidden_additions() { # -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ "$1" || res=1 + # check %l or %ll format specifier + awk -v FOLDERS='lib drivers app examples' \ + -v EXPRESSIONS='%ll*[xud]' \ + -v RET_ON_FAIL=1 \ + -v MESSAGE='Using %l format, prefer %PRI*64 if type is [u]int64_t' \ + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ + "$1" || res=1 + # forbid variable declaration inside "for" loop awk -v FOLDERS='.' \ -v EXPRESSIONS='for[[:space:]]*\\((char|u?int|unsigned|s?size_t)' \ @@ -118,6 +126,14 @@ check_forbidden_additions() { # -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ "$1" || res=1 + # refrain from using RTE_LOG_REGISTER for drivers and libs + awk -v FOLDERS='lib drivers' \ + -v EXPRESSIONS='\\' \ + -v RET_ON_FAIL=1 \ + -v MESSAGE='Using RTE_LOG_REGISTER, prefer RTE_LOG_REGISTER_(DEFAULT|SUFFIX)' \ + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ + "$1" || res=1 + # SVG must be included with wildcard extension to allow conversion awk -v FOLDERS='doc' \ -v EXPRESSIONS='::[[:space:]]*[^[:space:]]*\\.svg' \