diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2019-07-10 13:56:54 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-07-12 15:04:03 +0200 |
commit | 59d82657a08d4a9e6e2d99acc525ef748d36016b (patch) | |
tree | 232efc8744991dcdb1d8816b0f232034690ac59d /tools/testing | |
parent | 5464c3a0e9a037b63d5229cdea08dddc01a98aac (diff) | |
download | linux-stable-59d82657a08d4a9e6e2d99acc525ef748d36016b.tar.gz linux-stable-59d82657a08d4a9e6e2d99acc525ef748d36016b.tar.bz2 linux-stable-59d82657a08d4a9e6e2d99acc525ef748d36016b.zip |
selftests/bpf: fix bpf_target_sparc check
bpf_helpers.h fails to compile on sparc: the code should be checking
for defined(bpf_target_sparc), but checks simply for bpf_target_sparc.
Also change #ifdef bpf_target_powerpc to #if defined() for consistency.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/selftests/bpf/bpf_helpers.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h index 5a3d92c8bec8..5d63c66bc9d7 100644 --- a/tools/testing/selftests/bpf/bpf_helpers.h +++ b/tools/testing/selftests/bpf/bpf_helpers.h @@ -452,10 +452,10 @@ static int (*bpf_skb_adjust_room)(void *ctx, __s32 len_diff, __u32 mode, #endif -#ifdef bpf_target_powerpc +#if defined(bpf_target_powerpc) #define BPF_KPROBE_READ_RET_IP(ip, ctx) ({ (ip) = (ctx)->link; }) #define BPF_KRETPROBE_READ_RET_IP BPF_KPROBE_READ_RET_IP -#elif bpf_target_sparc +#elif defined(bpf_target_sparc) #define BPF_KPROBE_READ_RET_IP(ip, ctx) ({ (ip) = PT_REGS_RET(ctx); }) #define BPF_KRETPROBE_READ_RET_IP BPF_KPROBE_READ_RET_IP #else |