diff options
author | 2016-04-16 22:29:33 +0200 | |
---|---|---|
committer | 2016-04-18 20:58:55 -0400 | |
commit | 266a0a790fb545fa1802a899ac44f61b1d6335a7 (patch) | |
tree | 903b92e6f266ed94bf52efa7ca04d7c8809854cc /tools/perf/scripts/python/syscall-counts-by-pid.py | |
parent | of_mdio: make of_mdiobus_register_{device|phy}() *void* (diff) | |
download | wireguard-linux-266a0a790fb545fa1802a899ac44f61b1d6335a7.tar.xz wireguard-linux-266a0a790fb545fa1802a899ac44f61b1d6335a7.zip |
bpf: avoid warning for wrong pointer cast
Two new functions in bpf contain a cast from a 'u64' to a
pointer. This works on 64-bit architectures but causes a warning
on all 32-bit architectures:
kernel/trace/bpf_trace.c: In function 'bpf_perf_event_output_tp':
kernel/trace/bpf_trace.c:350:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
u64 ctx = *(long *)r1;
This changes the cast to first convert the u64 argument into a uintptr_t,
which is guaranteed to be the same size as a pointer.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 9940d67c93b5 ("bpf: support bpf_get_stackid() and bpf_perf_event_output() in tracepoint programs")
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions