devtools: recommend new logtype helpers
authorDavid Marchand <david.marchand@redhat.com>
Thu, 1 Jul 2021 14:11:31 +0000 (16:11 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 1 Jul 2021 19:54:22 +0000 (21:54 +0200)
Following commit eeded2044af5 ("log: register with standardized names"),
the new helpers should be preferred so that we can maintain a consistent
naming for logtypes.

Signed-off-by: David Marchand <david.marchand@redhat.com>
devtools/checkpatches.sh

index c30dadd..c314d83 100755 (executable)
@@ -126,6 +126,14 @@ check_forbidden_additions() { # <patch>
                -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='\\<RTE_LOG_REGISTER\\>' \
+               -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' \