From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CAF64A04C8; Fri, 15 Nov 2019 04:18:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 05EA22C08; Fri, 15 Nov 2019 04:18:20 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 1719D2BA8; Fri, 15 Nov 2019 04:18:19 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 757B7328; Thu, 14 Nov 2019 19:18:18 -0800 (PST) Received: from net-arm-thunderx2-02.shanghai.arm.com (net-arm-thunderx2-02.shanghai.arm.com [10.169.41.127]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 715AD3F52E; Thu, 14 Nov 2019 19:18:16 -0800 (PST) From: Ruifeng Wang To: jerinj@marvell.com, gavin.hu@arm.com Cc: dev@dpdk.org, honnappa.nagarahalli@arm.com, nd@arm.com, Ruifeng Wang , stable@dpdk.org Date: Fri, 15 Nov 2019 11:18:01 +0800 Message-Id: <20191115031801.83730-1-ruifeng.wang@arm.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] lib/bpf: fix clang build warnings for aarch64 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Reviewed-by: Phil Yang Reviewed-by: Gavin Hu --- 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