Skip to content

Commit

Permalink
perf/x86/amd/uncore: Fix __percpu annotation
Browse files Browse the repository at this point in the history
The __percpu annotation in struct amd_uncore is confusing Sparse:

  uncore.c:649:10: sparse: warning: incorrect type in initializer (different address spaces)
  uncore.c:649:10: sparse:    expected void const [noderef] __percpu *__vpp_verify
  uncore.c:649:10: sparse:    got union amd_uncore_info *

The reason is that the __percpu annotation sits between the '*'
dereferencing operator and the member name.

Move it before the dereferencing operator to cure this.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20240304005104.394845326@linutronix.de
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Mar 4, 2024
1 parent 3c94ba5 commit 9eae297
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/events/amd/uncore.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ union amd_uncore_info {
};

struct amd_uncore {
union amd_uncore_info * __percpu info;
union amd_uncore_info __percpu *info;
struct amd_uncore_pmu *pmus;
unsigned int num_pmus;
bool init_done;
Expand Down

0 comments on commit 9eae297

Please sign in to comment.