Commit 86f8e247 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by David S. Miller

test_bpf: Use ULL suffix for 64-bit constants

On 32-bit:

    lib/test_bpf.c:4772: warning: integer constant is too large for ‘unsigned long’ type
    lib/test_bpf.c:4772: warning: integer constant is too large for ‘unsigned long’ type
    lib/test_bpf.c:4773: warning: integer constant is too large for ‘unsigned long’ type
    lib/test_bpf.c:4773: warning: integer constant is too large for ‘unsigned long’ type
    lib/test_bpf.c:4787: warning: integer constant is too large for ‘unsigned long’ type
    lib/test_bpf.c:4787: warning: integer constant is too large for ‘unsigned long’ type
    lib/test_bpf.c:4801: warning: integer constant is too large for ‘unsigned long’ type
    lib/test_bpf.c:4801: warning: integer constant is too large for ‘unsigned long’ type
    lib/test_bpf.c:4802: warning: integer constant is too large for ‘unsigned long’ type
    lib/test_bpf.c:4802: warning: integer constant is too large for ‘unsigned long’ type

On 32-bit systems, "long" is only 32-bit.
Replace the "UL" suffix by "ULL" to fix this.

Fixes: 85f68fe8 ("bpf, arm64: implement jiting of BPF_XADD")
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4c54dc02
...@@ -4769,8 +4769,8 @@ static struct bpf_test tests[] = { ...@@ -4769,8 +4769,8 @@ static struct bpf_test tests[] = {
BPF_LD_IMM64(R1, 3), BPF_LD_IMM64(R1, 3),
BPF_LD_IMM64(R2, 2), BPF_LD_IMM64(R2, 2),
BPF_JMP_REG(BPF_JGE, R1, R2, 2), BPF_JMP_REG(BPF_JGE, R1, R2, 2),
BPF_LD_IMM64(R0, 0xffffffffffffffffUL), BPF_LD_IMM64(R0, 0xffffffffffffffffULL),
BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeUL), BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeULL),
BPF_EXIT_INSN(), BPF_EXIT_INSN(),
}, },
INTERNAL, INTERNAL,
...@@ -4784,7 +4784,7 @@ static struct bpf_test tests[] = { ...@@ -4784,7 +4784,7 @@ static struct bpf_test tests[] = {
BPF_LD_IMM64(R1, 3), BPF_LD_IMM64(R1, 3),
BPF_LD_IMM64(R2, 2), BPF_LD_IMM64(R2, 2),
BPF_JMP_REG(BPF_JGE, R1, R2, 0), BPF_JMP_REG(BPF_JGE, R1, R2, 0),
BPF_LD_IMM64(R0, 0xffffffffffffffffUL), BPF_LD_IMM64(R0, 0xffffffffffffffffULL),
BPF_EXIT_INSN(), BPF_EXIT_INSN(),
}, },
INTERNAL, INTERNAL,
...@@ -4798,8 +4798,8 @@ static struct bpf_test tests[] = { ...@@ -4798,8 +4798,8 @@ static struct bpf_test tests[] = {
BPF_LD_IMM64(R1, 3), BPF_LD_IMM64(R1, 3),
BPF_LD_IMM64(R2, 2), BPF_LD_IMM64(R2, 2),
BPF_JMP_REG(BPF_JGE, R1, R2, 4), BPF_JMP_REG(BPF_JGE, R1, R2, 4),
BPF_LD_IMM64(R0, 0xffffffffffffffffUL), BPF_LD_IMM64(R0, 0xffffffffffffffffULL),
BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeUL), BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeULL),
BPF_EXIT_INSN(), BPF_EXIT_INSN(),
}, },
INTERNAL, INTERNAL,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment