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.march...@redhat.com>
> Acked-by: Chengwen Feng <fengcheng...@huawei.com>
> Acked-by: Andrew Rybchenko <andrew.rybche...@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 <tho...@monjalon.net>


Reply via email to