Extend checkpatches.sh to detect the use of __builtin_(ffs|ffsll). These intrinsics are not available in MSVC, and there are perfectly serviceable alternatives in <rte_bitops.h>.
Signed-off-by: Mattias Rönnblom <mattias.ronnb...@ericsson.com> Suggested-by: David Marchand <david.march...@redhat.com> --- devtools/checkpatches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index c23792025a..411c40d275 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -179,7 +179,7 @@ check_forbidden_additions() { # <patch> # forbid use of non abstracted bit count operations awk -v FOLDERS="lib drivers app examples" \ - -v EXPRESSIONS='\\<__builtin_(clz|clzll|ctz|ctzll|popcount|popcountll)\\>' \ + -v EXPRESSIONS='\\<__builtin_(clz|clzll|ctz|ctzll|popcount|popcountll|ffs|ffsll)\\>' \ -v RET_ON_FAIL=1 \ -v MESSAGE='Using __builtin helpers for bit count operations' \ -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ -- 2.43.0