__reserved is a reserved keyword in Windows system headers.

Signed-off-by: David Marchand <david.march...@redhat.com>
---
 devtools/checkpatches.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index c314d83a29..25f60a4a27 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -134,6 +134,15 @@ check_forbidden_additions() { # <patch>
                -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
                "$1" || res=1
 
+       # refrain from using __reserved which is a reserved keyword in Windows
+       # system headers
+       awk -v FOLDERS="lib drivers app examples" \
+               -v EXPRESSIONS='\\<__reserved\\>' \
+               -v RET_ON_FAIL=1 \
+               -v MESSAGE='Using __reserved' \
+               -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.23.0

Reply via email to