diff options
| author | Michael Ellerman <[email protected]> | 2022-01-30 18:39:18 +0000 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2022-02-02 20:32:11 +1100 |
| commit | 961f649fb3ad9a9e384c695a050d776d970ddabd (patch) | |
| tree | 026e393fadfc06b4a4bdbb3c610bba102c8ea031 /tools/perf/scripts/python | |
| parent | ccafe7c20b7de330d9091a114c9985305759f1ee (diff) | |
powerpc/ptdump: Fix sparse warning in hashpagetable.c
As reported by sparse:
arch/powerpc/mm/ptdump/hashpagetable.c:264:29: warning: restricted __be64 degrades to integer
arch/powerpc/mm/ptdump/hashpagetable.c:265:49: warning: restricted __be64 degrades to integer
arch/powerpc/mm/ptdump/hashpagetable.c:267:36: warning: incorrect type in assignment (different base types)
arch/powerpc/mm/ptdump/hashpagetable.c:267:36: expected unsigned long long [usertype]
arch/powerpc/mm/ptdump/hashpagetable.c:267:36: got restricted __be64 [usertype] v
arch/powerpc/mm/ptdump/hashpagetable.c:268:36: warning: incorrect type in assignment (different base types)
arch/powerpc/mm/ptdump/hashpagetable.c:268:36: expected unsigned long long [usertype]
arch/powerpc/mm/ptdump/hashpagetable.c:268:36: got restricted __be64 [usertype] r
The values returned by plpar_pte_read_4() are CPU endian, not __be64, so
assigning them to struct hash_pte confuses sparse. As a minimal fix open
code a struct to hold the values with CPU endian types.
Reported-by: kernel test robot <[email protected]>
Reported-by: Christophe Leroy <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions