diff options
author | Uros Bizjak <[email protected]> | 2023-12-04 22:02:31 +0100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2023-12-11 11:47:15 +0100 |
commit | 3a1d3829e193c091475ceab481c5f8deab385023 (patch) | |
tree | 6f1b2bb8ef0387df502762a68aaabb3508016185 | |
parent | 13408c6ae684181d53c870cceddbd3a62ae34c3e (diff) |
x86/percpu: Avoid sparse warning with cast to named address space
Teach sparse about __seg_fs and __seg_gs named address space
qualifiers to to avoid warnings about unexpected keyword at
the end of cast operator.
Reported-by: kernel test robot <[email protected]>
Acked-by: Luc Van Oostenryck <[email protected]>
Signed-off-by: Uros Bizjak <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
-rw-r--r-- | arch/x86/include/asm/percpu.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h index 3859abad19ec..e56a37886143 100644 --- a/arch/x86/include/asm/percpu.h +++ b/arch/x86/include/asm/percpu.h @@ -36,6 +36,11 @@ #ifdef CONFIG_CC_HAS_NAMED_AS +#ifdef __CHECKER__ +#define __seg_gs __attribute__((address_space(__seg_gs))) +#define __seg_fs __attribute__((address_space(__seg_fs))) +#endif + #ifdef CONFIG_X86_64 #define __percpu_seg_override __seg_gs #else |