Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

genksyms: Handle typeof_unqual keyword and __seg_{fs,gs} qualifiers

Handle typeof_unqual, __typeof_unqual and __typeof_unqual__ keywords
using TYPEOF_KEYW token in the same way as typeof keyword.

Also ignore x86 __seg_fs and __seg_gs named address space qualifiers
using X86_SEG_KEYW token in the same way as const, volatile or
restrict qualifiers.

Fixes: ac053946f5c4 ("compiler.h: introduce TYPEOF_UNQUAL() macro")
Closes: https://lore.kernel.org/lkml/81a25a60-de78-43fb-b56a-131151e1c035@molgen.mpg.de/
Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Link: https://lore.kernel.org/r/20250413220749.270704-1-ubizjak@gmail.com

authored by

Uros Bizjak and committed by
Ingo Molnar
1013f563 d833dc59

+11 -1
+7
scripts/genksyms/keywords.c
··· 17 17 { "__signed__", SIGNED_KEYW }, 18 18 { "__typeof", TYPEOF_KEYW }, 19 19 { "__typeof__", TYPEOF_KEYW }, 20 + { "__typeof_unqual", TYPEOF_KEYW }, 21 + { "__typeof_unqual__", TYPEOF_KEYW }, 20 22 { "__volatile", VOLATILE_KEYW }, 21 23 { "__volatile__", VOLATILE_KEYW }, 22 24 { "__builtin_va_list", VA_LIST_KEYW }, ··· 42 40 // KAO. }, 43 41 // { "attribute", ATTRIBUTE_KEYW }, 44 42 43 + // X86 named address space qualifiers 44 + { "__seg_gs", X86_SEG_KEYW }, 45 + { "__seg_fs", X86_SEG_KEYW }, 46 + 45 47 { "auto", AUTO_KEYW }, 46 48 { "char", CHAR_KEYW }, 47 49 { "const", CONST_KEYW }, ··· 63 57 { "struct", STRUCT_KEYW }, 64 58 { "typedef", TYPEDEF_KEYW }, 65 59 { "typeof", TYPEOF_KEYW }, 60 + { "typeof_unqual", TYPEOF_KEYW }, 66 61 { "union", UNION_KEYW }, 67 62 { "unsigned", UNSIGNED_KEYW }, 68 63 { "void", VOID_KEYW },
+4 -1
scripts/genksyms/parse.y
··· 91 91 %token TYPEOF_KEYW 92 92 %token VA_LIST_KEYW 93 93 94 + %token X86_SEG_KEYW 95 + 94 96 %token EXPORT_SYMBOL_KEYW 95 97 96 98 %token ASM_PHRASE ··· 294 292 ; 295 293 296 294 type_qualifier: 297 - CONST_KEYW | VOLATILE_KEYW 295 + X86_SEG_KEYW 296 + | CONST_KEYW | VOLATILE_KEYW 298 297 | RESTRICT_KEYW 299 298 { /* restrict has no effect in prototypes so ignore it */ 300 299 remove_node($1);