Skip to content

Commit 86f8e24

Browse files
geertudavem330
authored andcommitted
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: 85f68fe ("bpf, arm64: implement jiting of BPF_XADD") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4c54dc0 commit 86f8e24

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/test_bpf.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4769,8 +4769,8 @@ static struct bpf_test tests[] = {
47694769
BPF_LD_IMM64(R1, 3),
47704770
BPF_LD_IMM64(R2, 2),
47714771
BPF_JMP_REG(BPF_JGE, R1, R2, 2),
4772-
BPF_LD_IMM64(R0, 0xffffffffffffffffUL),
4773-
BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeUL),
4772+
BPF_LD_IMM64(R0, 0xffffffffffffffffULL),
4773+
BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeULL),
47744774
BPF_EXIT_INSN(),
47754775
},
47764776
INTERNAL,
@@ -4784,7 +4784,7 @@ static struct bpf_test tests[] = {
47844784
BPF_LD_IMM64(R1, 3),
47854785
BPF_LD_IMM64(R2, 2),
47864786
BPF_JMP_REG(BPF_JGE, R1, R2, 0),
4787-
BPF_LD_IMM64(R0, 0xffffffffffffffffUL),
4787+
BPF_LD_IMM64(R0, 0xffffffffffffffffULL),
47884788
BPF_EXIT_INSN(),
47894789
},
47904790
INTERNAL,
@@ -4798,8 +4798,8 @@ static struct bpf_test tests[] = {
47984798
BPF_LD_IMM64(R1, 3),
47994799
BPF_LD_IMM64(R2, 2),
48004800
BPF_JMP_REG(BPF_JGE, R1, R2, 4),
4801-
BPF_LD_IMM64(R0, 0xffffffffffffffffUL),
4802-
BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeUL),
4801+
BPF_LD_IMM64(R0, 0xffffffffffffffffULL),
4802+
BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeULL),
48034803
BPF_EXIT_INSN(),
48044804
},
48054805
INTERNAL,

0 commit comments

Comments
 (0)