[RFC,v3,01/26] devtools: forbid inclusions of driver only headers
Commit Message
Let's be good citizens and enforce not using driver only headers in our
own examples.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
devtools/checkpatches.sh | 8 ++++++++
1 file changed, 8 insertions(+)
Comments
On Thu, Jul 28, 2022 at 05:26:15PM +0200, David Marchand wrote:
> Let's be good citizens and enforce not using driver only headers in our
> own examples.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
@@ -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' \