linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soreuseport: Fix reuseport_bpf testcase on 32bit architectures
@ 2016-06-03 17:19 Helge Deller
  2016-06-06 22:20 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Helge Deller @ 2016-06-03 17:19 UTC (permalink / raw)
  To: Craig Gallek, Alexei Starovoitov, David S. Miller, netdev; +Cc: linux-parisc

This fixes the following compiler warnings when compiling the
reuseport_bpf testcase on a 32 bit platform:

reuseport_bpf.c: In function =E2=80=98attach_ebpf=E2=80=99:
reuseport_bpf.c:114:15: warning: cast from pointer to integer of iffere=
nt size [-Wpointer-to-int-cast]

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/tools/testing/selftests/net/reuseport_bpf.c b/tools/testin=
g/selftests/net/reuseport_bpf.c
index 96ba386..4a82174 100644
--- a/tools/testing/selftests/net/reuseport_bpf.c
+++ b/tools/testing/selftests/net/reuseport_bpf.c
@@ -111,9 +111,9 @@ static void attach_ebpf(int fd, uint16_t mod)
 	memset(&attr, 0, sizeof(attr));
 	attr.prog_type =3D BPF_PROG_TYPE_SOCKET_FILTER;
 	attr.insn_cnt =3D ARRAY_SIZE(prog);
-	attr.insns =3D (uint64_t)prog;
-	attr.license =3D (uint64_t)bpf_license;
-	attr.log_buf =3D (uint64_t)bpf_log_buf;
+	attr.insns =3D (unsigned long) &prog;
+	attr.license =3D (unsigned long) &bpf_license;
+	attr.log_buf =3D (unsigned long) &bpf_log_buf;
 	attr.log_size =3D sizeof(bpf_log_buf);
 	attr.log_level =3D 1;
 	attr.kern_version =3D 0;
@@ -351,8 +351,8 @@ static void test_filter_no_reuseport(const struct t=
est_params p)
 	memset(&eprog, 0, sizeof(eprog));
 	eprog.prog_type =3D BPF_PROG_TYPE_SOCKET_FILTER;
 	eprog.insn_cnt =3D ARRAY_SIZE(ecode);
-	eprog.insns =3D (uint64_t)ecode;
-	eprog.license =3D (uint64_t)bpf_license;
+	eprog.insns =3D (unsigned long) &ecode;
+	eprog.license =3D (unsigned long) &bpf_license;
 	eprog.kern_version =3D 0;
=20
 	memset(&cprog, 0, sizeof(cprog));
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc"=
 in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* Re: [PATCH] soreuseport: Fix reuseport_bpf testcase on 32bit architectures
@ 2016-06-03 21:29 Craig Gallek
  0 siblings, 0 replies; 3+ messages in thread
From: Craig Gallek @ 2016-06-03 21:29 UTC (permalink / raw)
  To: Helge Deller; +Cc: Alexei Starovoitov, David S. Miller, netdev, linux-parisc

On Fri, Jun 3, 2016 at 1:19 PM, Helge Deller <deller@gmx.de> wrote:
> This fixes the following compiler warnings when compiling the
> reuseport_bpf testcase on a 32 bit platform:
>
> reuseport_bpf.c: In function =E2=80=98attach_ebpf=E2=80=99:
> reuseport_bpf.c:114:15: warning: cast from pointer to integer of iffe=
rent size [-Wpointer-to-int-cast]
>
> Signed-off-by: Helge Deller <deller@gmx.de>
Acked-by: Craig Gallek <kraig@google.com>

Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-06 22:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-03 17:19 [PATCH] soreuseport: Fix reuseport_bpf testcase on 32bit architectures Helge Deller
2016-06-06 22:20 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2016-06-03 21:29 Craig Gallek

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).