[PATCH v2] devtools: fix regex of skip files

pbhagavatula at marvell.com pbhagavatula at marvell.com
Thu Mar 6 18:12:10 CET 2025


From: Pavan Nikhilesh <pbhagavatula at marvell.com>

SKIP_FILES should include the path of the file along with the name.
Update the regex to match the entire path.

Fixes: dd88f51a5725 ("devtools: forbid DPDK API in cnxk base driver")
Fixes: 2b843cac232e ("drivers: use per line logging in helpers")

Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
---
v2 Changes:
- add fix for osdep.h. (Thomas)
- Use the correct regex pattern for matching file name at the end. (Thomas)

 devtools/checkpatches.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 003bb49e04..c9088bb403 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -63,7 +63,7 @@ check_forbidden_additions() { # <patch>

 	# 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 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' \
@@ -236,7 +236,7 @@ check_forbidden_additions() { # <patch>

 	# forbid rte_ symbols in cnxk base driver
 	awk -v FOLDERS='drivers/common/cnxk/roc_*' \
-		-v SKIP_FILES='roc_platform*' \
+		-v SKIP_FILES='.*roc_platform.*' \
 		-v EXPRESSIONS="rte_ RTE_" \
 		-v RET_ON_FAIL=1 \
 		-v MESSAGE='Use plt_ symbols instead of rte_ API in cnxk base driver' \
--
2.43.0



More information about the dev mailing list