From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BC441A0C45; Fri, 30 Jul 2021 11:33:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4BBB94068B; Fri, 30 Jul 2021 11:33:16 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 37A294014D for ; Fri, 30 Jul 2021 11:33:15 +0200 (CEST) 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 74B9D1FB; Fri, 30 Jul 2021 02:33:14 -0700 (PDT) Received: from net-arm-n1amp-02.shanghai.arm.com (net-arm-n1amp-02.shanghai.arm.com [10.169.210.110]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CC7B53F66F; Fri, 30 Jul 2021 02:33:11 -0700 (PDT) From: Ruifeng Wang To: Beilei Xing , Dapeng Yu , Qi Zhang Cc: dev@dpdk.org, thomas@monjalon.net, david.marchand@redhat.com, nd@arm.com, Ruifeng Wang Date: Fri, 30 Jul 2021 17:32:58 +0800 Message-Id: <20210730093258.46064-1-ruifeng.wang@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/i40e: fix clang warning on non-x86 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Build on aarch64 with clang-10 has warning: i40e_rxtx.c:3228:1: warning: unused function 'get_avx_supported' [-Wunused-function] The function is used in x86 specific path. Moved it into ifdef to fix build on non-x86. Fixes: c30751afc360 ("net/i40e: fix data path selection in secondary process") Cc: dapengx.yu@intel.com Signed-off-by: Ruifeng Wang --- drivers/net/i40e/i40e_rxtx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 026cda948c..8329cbdd4e 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -3224,10 +3224,10 @@ i40e_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->conf.offloads = txq->offloads; } +#ifdef RTE_ARCH_X86 static inline bool get_avx_supported(bool request_avx512) { -#ifdef RTE_ARCH_X86 if (request_avx512) { if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_512 && rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1 && @@ -3251,12 +3251,10 @@ get_avx_supported(bool request_avx512) return false; #endif } -#else - RTE_SET_USED(request_avx512); -#endif /* RTE_ARCH_X86 */ return false; } +#endif /* RTE_ARCH_X86 */ void __rte_cold -- 2.25.1