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 7ADDEA04C0; Fri, 15 Nov 2019 07:48:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EC7CE2C27; Fri, 15 Nov 2019 07:48:09 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 49A272C18 for ; Fri, 15 Nov 2019 07:48:08 +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 A59F431B; Thu, 14 Nov 2019 22:48:07 -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 9CB2A3F52E; Thu, 14 Nov 2019 22:51:05 -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 Date: Fri, 15 Nov 2019 14:47:54 +0800 Message-Id: <20191115064754.57605-1-ruifeng.wang@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191115031801.83730-1-ruifeng.wang@arm.com> References: <20191115031801.83730-1-ruifeng.wang@arm.com> Subject: [dpdk-dev] [PATCH v2] 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" 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 Reviewed-by: Phil Yang Reviewed-by: Gavin Hu --- 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