patches for DPDK stable branches
 help / color / mirror / Atom feed
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>,
	stable@dpdk.org
Subject: [dpdk-stable] [PATCH] lib/bpf: fix clang build warnings for aarch64
Date: Fri, 15 Nov 2019 11:18:01 +0800	[thread overview]
Message-ID: <20191115031801.83730-1-ruifeng.wang@arm.com> (raw)

Couple of warnings will block build when warnings been treated as errors.
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: stable@dpdk.org

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


             reply	other threads:[~2019-11-15  3:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15  3:18 Ruifeng Wang [this message]
2019-11-15  3:45 ` [dpdk-stable] [dpdk-dev] " Jerin Jacob

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=20191115031801.83730-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 \
    --cc=stable@dpdk.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).