[RFC v3 01/26] devtools: forbid inclusions of driver only headers
David Marchand
david.marchand at redhat.com
Thu Jul 28 17:26:15 CEST 2022
Let's be good citizens and enforce not using driver only headers in our
own examples.
Signed-off-by: David Marchand <david.marchand at redhat.com>
---
devtools/checkpatches.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 1edc5810ad..0e82c01947 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -142,6 +142,14 @@ check_forbidden_additions() { # <patch>
-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
"$1" || res=1
+ # forbid inclusion of driver specific headers in apps and examples
+ awk -v FOLDERS='app examples' \
+ -v EXPRESSIONS='include.*_driver\\.h include.*_pmd\\.h' \
+ -v RET_ON_FAIL=1 \
+ -v MESSAGE='Using driver specific headers in applications' \
+ -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
+ "$1" || res=1
+
# SVG must be included with wildcard extension to allow conversion
awk -v FOLDERS='doc' \
-v EXPRESSIONS='::[[:space:]]*[^[:space:]]*\\.svg' \
--
2.36.1
More information about the dev
mailing list