From: Ruifeng Wang <ruifeng.wang@arm.com>
To: Beilei Xing <beilei.xing@intel.com>,
Dapeng Yu <dapengx.yu@intel.com>, Qi Zhang <qi.z.zhang@intel.com>
Cc: dev@dpdk.org, thomas@monjalon.net, david.marchand@redhat.com,
nd@arm.com, Ruifeng Wang <ruifeng.wang@arm.com>
Subject: [dpdk-dev] [PATCH] net/i40e: fix clang warning on non-x86
Date: Fri, 30 Jul 2021 17:32:58 +0800 [thread overview]
Message-ID: <20210730093258.46064-1-ruifeng.wang@arm.com> (raw)
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
next reply other threads:[~2021-07-30 9:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-30 9:32 Ruifeng Wang [this message]
2021-08-10 7:51 ` Zhang, Qi Z
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=20210730093258.46064-1-ruifeng.wang@arm.com \
--to=ruifeng.wang@arm.com \
--cc=beilei.xing@intel.com \
--cc=dapengx.yu@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=nd@arm.com \
--cc=qi.z.zhang@intel.com \
--cc=thomas@monjalon.net \
/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).