DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix clang warning on non-x86
@ 2021-07-30  9:32 Ruifeng Wang
  2021-08-10  7:51 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Ruifeng Wang @ 2021-07-30  9:32 UTC (permalink / raw)
  To: Beilei Xing, Dapeng Yu, Qi Zhang
  Cc: dev, thomas, david.marchand, nd, Ruifeng Wang

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 <ruifeng.wang@arm.com>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-10  7:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30  9:32 [dpdk-dev] [PATCH] net/i40e: fix clang warning on non-x86 Ruifeng Wang
2021-08-10  7:51 ` Zhang, Qi Z

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