diff options
author | Uros Bizjak <[email protected]> | 2024-04-02 19:50:38 +0200 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2024-04-03 08:59:15 +0200 |
commit | a55c1fdad5f61b4bfe42319694b23671a758cb28 (patch) | |
tree | 20242f94f6d82b3204e117444bbc4f98cb7758c3 /tools/perf/util/trace-event-scripting.c | |
parent | 6a2bcf9277dcbdef88d514113434b45f8ffc5469 (diff) |
x86/percpu: Use __force to cast from __percpu address space
Fix Sparse warning when casting from __percpu address space by using
__force in the cast. x86 named address spaces are not considered to
be subspaces of the generic (flat) address space, so explicit casts
are required to convert pointers between these address spaces and the
generic address space (the application should cast to uintptr_t and
apply the segment base offset). The cast to uintptr_t removes
__percpu address space tag and Sparse reports:
warning: cast removes address space '__percpu' of expression
Use __force to inform Sparse that the cast is intentional.
Fixes: 9a462b9eafa6 ("x86/percpu: Use compiler segment prefix qualifier")
Reported-by: Charlemagne Lasse <[email protected]>
Signed-off-by: Uros Bizjak <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Closes: https://lore.kernel.org/lkml/CAFGhKbzev7W4aHwhFPWwMZQEHenVgZUj7=aunFieVqZg3mt14A@mail.gmail.com/
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions