[v3,02/12] devtools: prevent use of rte atomic APIs in future patches
Checks
Commit Message
In order to deprecate the rte_atomic APIs, prevent the patches
from using rte_atomic APIs.
Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
devtools/checkpatches.sh | 9 +++++++++
1 file changed, 9 insertions(+)
@@ -61,6 +61,15 @@ check_forbidden_additions() { # <patch>
-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
"$1" || res=1
+ # refrain from new additions of 16/32/64 bits rte_atomic_xxx()
+ # multiple folders and expressions are separated by spaces
+ awk -v FOLDERS="lib drivers app examples" \
+ -v EXPRESSIONS="rte_atomic[0-9][0-9]_.*\\\(" \
+ -v RET_ON_FAIL=1 \
+ -v MESSAGE='Using c11 atomic built-ins instead of rte_atomic' \
+ -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
+ "$1" || res=1
+
# svg figures must be included with wildcard extension
# because of png conversion for pdf docs
awk -v FOLDERS='doc' \