[PATCH v2 14/14] drivers: use per line logging in helpers
Thomas Monjalon
thomas at monjalon.net
Tue Oct 1 14:10:47 CEST 2024
12/09/2024 10:26, David Marchand:
> Use RTE_LOG(_DP)?_LINE(_PREFIX)? in existing macros that append a \n.
>
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> Acked-by: Chengwen Feng <fengchengwen at huawei.com>
> Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
[...]
> --- 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
It should be easier to maintain, thanks for the cleanup.
Acked-by: Thomas Monjalon <thomas at monjalon.net>
More information about the dev
mailing list