diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2017-05-03 07:31:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-03 09:51:26 -0400 |
commit | 86f8e247b960d6cf4cad8b65162e73301c5a58ec (patch) | |
tree | 7ced2b842e32bff6ff7d5f13bd8e4b0f4bc43ce5 | |
parent | 4c54dc0277d0d55a9248c43aebd31858f926a056 (diff) |
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: 85f68fe898320575 ("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>
-rw-r--r-- | lib/test_bpf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/test_bpf.c b/lib/test_bpf.c index a0f66280ea50..889bc31785be 100644 --- a/lib/test_bpf.c +++ b/lib/test_bpf.c | |||
@@ -4769,8 +4769,8 @@ static struct bpf_test tests[] = { | |||
4769 | BPF_LD_IMM64(R1, 3), | 4769 | BPF_LD_IMM64(R1, 3), |
4770 | BPF_LD_IMM64(R2, 2), | 4770 | BPF_LD_IMM64(R2, 2), |
4771 | BPF_JMP_REG(BPF_JGE, R1, R2, 2), | 4771 | BPF_JMP_REG(BPF_JGE, R1, R2, 2), |
4772 | BPF_LD_IMM64(R0, 0xffffffffffffffffUL), | 4772 | BPF_LD_IMM64(R0, 0xffffffffffffffffULL), |
4773 | BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeUL), | 4773 | BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeULL), |
4774 | BPF_EXIT_INSN(), | 4774 | BPF_EXIT_INSN(), |
4775 | }, | 4775 | }, |
4776 | INTERNAL, | 4776 | INTERNAL, |
@@ -4784,7 +4784,7 @@ static struct bpf_test tests[] = { | |||
4784 | BPF_LD_IMM64(R1, 3), | 4784 | BPF_LD_IMM64(R1, 3), |
4785 | BPF_LD_IMM64(R2, 2), | 4785 | BPF_LD_IMM64(R2, 2), |
4786 | BPF_JMP_REG(BPF_JGE, R1, R2, 0), | 4786 | BPF_JMP_REG(BPF_JGE, R1, R2, 0), |
4787 | BPF_LD_IMM64(R0, 0xffffffffffffffffUL), | 4787 | BPF_LD_IMM64(R0, 0xffffffffffffffffULL), |
4788 | BPF_EXIT_INSN(), | 4788 | BPF_EXIT_INSN(), |
4789 | }, | 4789 | }, |
4790 | INTERNAL, | 4790 | INTERNAL, |
@@ -4798,8 +4798,8 @@ static struct bpf_test tests[] = { | |||
4798 | BPF_LD_IMM64(R1, 3), | 4798 | BPF_LD_IMM64(R1, 3), |
4799 | BPF_LD_IMM64(R2, 2), | 4799 | BPF_LD_IMM64(R2, 2), |
4800 | BPF_JMP_REG(BPF_JGE, R1, R2, 4), | 4800 | BPF_JMP_REG(BPF_JGE, R1, R2, 4), |
4801 | BPF_LD_IMM64(R0, 0xffffffffffffffffUL), | 4801 | BPF_LD_IMM64(R0, 0xffffffffffffffffULL), |
4802 | BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeUL), | 4802 | BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeULL), |
4803 | BPF_EXIT_INSN(), | 4803 | BPF_EXIT_INSN(), |
4804 | }, | 4804 | }, |
4805 | INTERNAL, | 4805 | INTERNAL, |