summaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorMattias Rönnblom <[email protected]>2024-10-16 15:54:11 +0200
committerDavid Marchand <[email protected]>2024-10-16 22:56:44 +0200
commit65c6733a679eb4cc3b6dc00af75bc65280422775 (patch)
tree3b3617dbb2fd15d408a463ae4cfdecb7d29404f6 /devtools
parent5f3cd043a8e115353902b8b5d76ec0bb1928a2f5 (diff)
devtools: forbid more builtin helpers for bit count
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>. Suggested-by: David Marchand <[email protected]> Signed-off-by: Mattias Rönnblom <[email protected]> Signed-off-by: David Marchand <[email protected]>
Diffstat (limited to 'devtools')
-rwxr-xr-xdevtools/checkpatches.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index c23792025a..d860f19045 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|ctz|ffs|popcount)(ll)?\\>' \
-v RET_ON_FAIL=1 \
-v MESSAGE='Using __builtin helpers for bit count operations' \
-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \