* [PATCH] test_bpf: Use ULL suffix for 64-bit constants
@ 2017-05-03 11:31 Geert Uytterhoeven
2017-05-03 11:34 ` Daniel Borkmann
2017-05-03 13:54 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2017-05-03 11:31 UTC (permalink / raw)
To: David S . Miller, Alexei Starovoitov, Daniel Borkmann
Cc: netdev, --cc, linux-kernel, Geert Uytterhoeven
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>
---
lib/test_bpf.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index a0f66280ea502e63..889bc31785bee579 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -4769,8 +4769,8 @@ static struct bpf_test tests[] = {
BPF_LD_IMM64(R1, 3),
BPF_LD_IMM64(R2, 2),
BPF_JMP_REG(BPF_JGE, R1, R2, 2),
- BPF_LD_IMM64(R0, 0xffffffffffffffffUL),
- BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeUL),
+ BPF_LD_IMM64(R0, 0xffffffffffffffffULL),
+ BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeULL),
BPF_EXIT_INSN(),
},
INTERNAL,
@@ -4784,7 +4784,7 @@ static struct bpf_test tests[] = {
BPF_LD_IMM64(R1, 3),
BPF_LD_IMM64(R2, 2),
BPF_JMP_REG(BPF_JGE, R1, R2, 0),
- BPF_LD_IMM64(R0, 0xffffffffffffffffUL),
+ BPF_LD_IMM64(R0, 0xffffffffffffffffULL),
BPF_EXIT_INSN(),
},
INTERNAL,
@@ -4798,8 +4798,8 @@ static struct bpf_test tests[] = {
BPF_LD_IMM64(R1, 3),
BPF_LD_IMM64(R2, 2),
BPF_JMP_REG(BPF_JGE, R1, R2, 4),
- BPF_LD_IMM64(R0, 0xffffffffffffffffUL),
- BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeUL),
+ BPF_LD_IMM64(R0, 0xffffffffffffffffULL),
+ BPF_LD_IMM64(R0, 0xeeeeeeeeeeeeeeeeULL),
BPF_EXIT_INSN(),
},
INTERNAL,
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] test_bpf: Use ULL suffix for 64-bit constants
2017-05-03 11:31 [PATCH] test_bpf: Use ULL suffix for 64-bit constants Geert Uytterhoeven
@ 2017-05-03 11:34 ` Daniel Borkmann
2017-05-03 13:54 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Borkmann @ 2017-05-03 11:34 UTC (permalink / raw)
To: Geert Uytterhoeven, David S . Miller, Alexei Starovoitov
Cc: netdev, --cc, linux-kernel
On 05/03/2017 01:31 PM, Geert Uytterhoeven wrote:
> 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>
Yep, of course, not sure how I missed it! :/ Thanks!
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] test_bpf: Use ULL suffix for 64-bit constants
2017-05-03 11:31 [PATCH] test_bpf: Use ULL suffix for 64-bit constants Geert Uytterhoeven
2017-05-03 11:34 ` Daniel Borkmann
@ 2017-05-03 13:54 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-05-03 13:54 UTC (permalink / raw)
To: geert; +Cc: ast, daniel, netdev, linux-kernel
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Wed, 3 May 2017 13:31:04 +0200
> 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>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-03 13:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-03 11:31 [PATCH] test_bpf: Use ULL suffix for 64-bit constants Geert Uytterhoeven
2017-05-03 11:34 ` Daniel Borkmann
2017-05-03 13:54 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).