From: Ruifeng Wang <ruifeng.wang@arm.com>
To: jerinj@marvell.com, gavin.hu@arm.com
Cc: dev@dpdk.org, honnappa.nagarahalli@arm.com, nd@arm.com,
Ruifeng Wang <ruifeng.wang@arm.com>
Subject: [dpdk-dev] [PATCH v2] lib/bpf: fix clang build warnings for aarch64
Date: Fri, 15 Nov 2019 14:47:54 +0800 [thread overview]
Message-ID: <20191115064754.57605-1-ruifeng.wang@arm.com> (raw)
In-Reply-To: <20191115031801.83730-1-ruifeng.wang@arm.com>
Clang has different prototype for __builtin___clear_cache(). It requires
'char *' parameters while gcc requires 'void *'.
Clang version 8.0 was used.
Warning messages during build:
../lib/librte_bpf/bpf_jit_arm64.c:1438:26: warning: incompatible pointer
types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type
'char *' [-Wincompatible-pointer-types]
__builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
^~~~~~~
../lib/librte_bpf/bpf_jit_arm64.c:1438:35: warning: incompatible pointer
types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type
'char *' [-Wincompatible-pointer-types]
__builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
^~~~~~~~~~~~~~~~~
Fixes: f3e516772464 ("bpf/arm: add prologue and epilogue")
Cc: jerinj@marvell.com
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
v2:
Update commit message for failure reason. (Jerin)
lib/librte_bpf/bpf_jit_arm64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_bpf/bpf_jit_arm64.c b/lib/librte_bpf/bpf_jit_arm64.c
index 8882fee67..a5a5d46f0 100644
--- a/lib/librte_bpf/bpf_jit_arm64.c
+++ b/lib/librte_bpf/bpf_jit_arm64.c
@@ -1435,7 +1435,7 @@ bpf_jit_arm64(struct rte_bpf *bpf)
}
/* Flush the icache */
- __builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
+ __builtin___clear_cache((char *)ctx.ins, (char *)(ctx.ins + ctx.idx));
bpf->jit.func = (void *)ctx.ins;
bpf->jit.sz = size;
--
2.17.1
next prev parent reply other threads:[~2019-11-15 6:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 3:18 [dpdk-dev] [PATCH] " Ruifeng Wang
2019-11-15 3:45 ` Jerin Jacob
2019-11-15 6:47 ` Ruifeng Wang [this message]
2019-11-15 7:14 ` [dpdk-dev] [PATCH v2] " Jerin Jacob
2019-11-20 23:32 ` Thomas Monjalon
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=20191115064754.57605-1-ruifeng.wang@arm.com \
--to=ruifeng.wang@arm.com \
--cc=dev@dpdk.org \
--cc=gavin.hu@arm.com \
--cc=honnappa.nagarahalli@arm.com \
--cc=jerinj@marvell.com \
--cc=nd@arm.com \
/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).