linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Craig Gallek <kraig@google.com>,
	Alexei Starovoitov <ast@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Subject: [PATCH] soreuseport: Fix reuseport_bpf testcase on 32bit architectures
Date: Fri, 3 Jun 2016 19:19:20 +0200	[thread overview]
Message-ID: <20160603171920.GB3664@ls3530.box> (raw)

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

             reply	other threads:[~2016-06-03 17:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03 17:19 Helge Deller [this message]
2016-06-06 22:20 ` [PATCH] soreuseport: Fix reuseport_bpf testcase on 32bit architectures David Miller
  -- strict thread matches above, loose matches on Subject: below --
2016-06-03 21:29 Craig Gallek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160603171920.GB3664@ls3530.box \
    --to=deller@gmx.de \
    --cc=ast@kernel.org \
    --cc=davem@davemloft.net \
    --cc=kraig@google.com \
    --cc=linux-parisc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).