diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2025-01-14 00:00:48 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2025-01-18 09:11:46 +0900 |
commit | ec28bfff83c49b65527f0055e313d9d7c8c04a31 (patch) | |
tree | 95807ad5e8f55224efc7a262edd3c54e1b45725d /scripts | |
parent | ccc11a195c69b0c01ee140aecadfbdcdcdd03605 (diff) | |
download | linux-ec28bfff83c49b65527f0055e313d9d7c8c04a31.tar.gz linux-ec28bfff83c49b65527f0055e313d9d7c8c04a31.tar.bz2 linux-ec28bfff83c49b65527f0055e313d9d7c8c04a31.zip |
genksyms: decouple ATTRIBUTE_PHRASE from type-qualifier
The __attribute__ keyword can appear in more contexts than 'const' or
'volatile'.
To avoid grammatical conflicts with future changes, ATTRIBUTE_PHRASE
should not be reduced into type_qualifier.
No functional changes are intended.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Nicolas Schier <n.schier@avm.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/genksyms/parse.y | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y index e3c160046143..cd933a95548d 100644 --- a/scripts/genksyms/parse.y +++ b/scripts/genksyms/parse.y @@ -216,6 +216,7 @@ decl_specifier: } | type_specifier { dont_want_type_specifier = true; $$ = $1; } | type_qualifier + | ATTRIBUTE_PHRASE ; storage_class_specifier: @@ -285,11 +286,13 @@ type_qualifier_seq_opt: type_qualifier_seq: type_qualifier + | ATTRIBUTE_PHRASE | type_qualifier_seq type_qualifier { $$ = $2; } + | type_qualifier_seq ATTRIBUTE_PHRASE { $$ = $2; } ; type_qualifier: - CONST_KEYW | VOLATILE_KEYW | ATTRIBUTE_PHRASE + CONST_KEYW | VOLATILE_KEYW | RESTRICT_KEYW { /* restrict has no effect in prototypes so ignore it */ remove_node($1); |