summaryrefslogtreecommitdiff
path: root/kernel/sysctl_binary.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-04-16 22:29:33 +0200
committerMichael Bestas <mkbestas@lineageos.org>2022-04-19 00:50:16 +0300
commit192465896e922ba4c2813f8edfb6471ddb369217 (patch)
treecb61bb3027db5e53294ea9476aa91833bcaa4c46 /kernel/sysctl_binary.c
parentd9d04ea88b410d9df6554a940b0d92d5fa81b068 (diff)
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> Signed-off-by: Chatur27 <jasonbright2709@gmail.com>
Diffstat (limited to 'kernel/sysctl_binary.c')
0 files changed, 0 insertions, 0 deletions