summaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorDavid Marchand <[email protected]>2023-12-13 19:23:04 +0100
committerDavid Marchand <[email protected]>2024-10-03 16:18:27 +0200
commit2b843cac232eb3f2fa79e4254e21766817e2019f (patch)
treeb6f706fa3f1e916cc55f7ad2b5796e140980b2cd /devtools
parent6f0f1065cc0e20b73bf69602d1d069a4be76d126 (diff)
drivers: use per line logging in helpers
Use RTE_LOG(_DP)?_LINE(_PREFIX)? in existing macros that append a \n. Signed-off-by: David Marchand <[email protected]> Acked-by: Chengwen Feng <[email protected]> Acked-by: Andrew Rybchenko <[email protected]> Acked-by: Thomas Monjalon <[email protected]>
Diffstat (limited to 'devtools')
-rwxr-xr-xdevtools/checkpatches.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 8f245ebdab..0ab841bd5a 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -53,7 +53,7 @@ print_usage () {
check_forbidden_additions() { # <patch>
res=0
- # refrain from new calls to RTE_LOG
+ # refrain from new calls to RTE_LOG in libraries
awk -v FOLDERS="lib" \
-v EXPRESSIONS="RTE_LOG\\\(" \
-v RET_ON_FAIL=1 \
@@ -61,6 +61,15 @@ check_forbidden_additions() { # <patch>
-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
"$1" || res=1
+ # refrain from new calls to RTE_LOG in drivers (but leave some leeway for base drivers)
+ awk -v FOLDERS="drivers" \
+ -v SKIP_FILES='osdep.h$' \
+ -v EXPRESSIONS="RTE_LOG\\\( RTE_LOG_DP\\\( rte_log\\\(" \
+ -v RET_ON_FAIL=1 \
+ -v MESSAGE='Prefer RTE_LOG_LINE/RTE_LOG_DP_LINE' \
+ -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
+ "$1" || res=1
+
# no output on stdout or stderr
awk -v FOLDERS="lib drivers" \
-v EXPRESSIONS="\\\<printf\\\> \\\<fprintf\\\(stdout, \\\<fprintf\\\(stderr," \