diff options
author | Mike Rapoport <rppt@linux.ibm.com> | 2020-06-27 11:16:53 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-21 18:25:59 -0700 |
commit | c0d5b0c721b67d13796914031cc8b9bbf2c7f453 (patch) | |
tree | 9578ec169cd59c43f04aeeeae1ba4fe4b6cfd5d4 /tools/perf/scripts/python/stat-cpi.py | |
parent | 72a7af33e08083c118b57c93c1456cc9a5045dc6 (diff) |
sparc32: srmmu: improve type safety of __nocache_fix()
The __nocache_fix(VADDR) macro is used to add an offset for pointers and
its "return type" is 'void *'.
We can do better and keep the type information with simply by casting the
return value to (__typeof__(VADDR)).
This will ".. show when those pgd/p4d/pud pointers get mis-used because
they don't end up dropping the type info.."
The addition of the casting to __nocache_fix() also allows to remove
explicit casts at its call sites.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Link: https://lkml.kernel.org/r/CAHk-=wisORTa7QVPnFqNw9pFs62UiwgsD4C4d=MtYy1o4JPyGQ@mail.gmail.com
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions