devtools: recommend new logtype helpers

Message ID 20210701141131.8076-1-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series devtools: recommend new logtype helpers |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot success github build: passed
ci/iol-testing fail Testing issues
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Functional fail Functional Testing issues
ci/iol-abi-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS

Commit Message

David Marchand July 1, 2021, 2:11 p.m. UTC
  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 | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Comments

Thomas Monjalon July 1, 2021, 7:57 p.m. UTC | #1
01/07/2021 16:11, David Marchand:
> 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>

Applied, thanks
  

Patch

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index c30dadd962..c314d83a29 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -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' \