mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 13:41:55 +00:00
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 <lkp@intel.com> Acked-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20231204210320.114429-3-ubizjak@gmail.com Closes: https://lore.kernel.org/oe-kbuild-all/202310080853.UhMe5iWa-lkp@intel.com/
This commit is contained in:
parent
13408c6ae6
commit
3a1d3829e1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user