All of lore.kernel.org
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/iavf: fix coverity issue
@ 2021-05-10  1:32 Wenzhuo Lu
  2021-05-10  2:52 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Wenzhuo Lu @ 2021-05-10  1:32 UTC (permalink / raw)
  To: dev; +Cc: Wenzhuo Lu

The coverity issue,
"CID 370606:  Control flow issues  (DEADCODE)
Execution cannot reach the expression "use_avx2"
inside this statement: "if (!use_sse && !use_avx2 &..."."

After commit bb3ef9aaa478, the check is useless.

Fixes: bb3ef9aaa478 ("net/iavf: fix Rx function selection")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 87f7eeb..74b5ab5 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2393,7 +2393,6 @@
 	struct iavf_rx_queue *rxq;
 	int i;
 	int check_ret;
-	bool use_sse = false;
 	bool use_avx2 = false;
 	bool use_avx512 = false;
 	bool use_flex = false;
@@ -2401,7 +2400,6 @@
 	check_ret = iavf_rx_vec_dev_check(dev);
 	if (check_ret >= 0 &&
 	    rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
-		use_sse = true;
 		if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 ||
 		     rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) &&
 		    rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256)
@@ -2414,9 +2412,6 @@
 			use_avx512 = true;
 #endif
 
-		if (!use_sse && !use_avx2 && !use_avx512)
-			goto normal;
-
 		if (vf->vf_res->vf_cap_flags &
 			VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC)
 			use_flex = true;
@@ -2520,7 +2515,6 @@
 		return;
 	}
 
-normal:
 #endif
 	if (dev->data->scattered_rx) {
 		PMD_DRV_LOG(DEBUG, "Using a Scattered Rx callback (port=%d).",
-- 
1.9.3


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

* Re: [dpdk-dev] [PATCH] net/iavf: fix coverity issue
  2021-05-10  1:32 [dpdk-dev] [PATCH] net/iavf: fix coverity issue Wenzhuo Lu
@ 2021-05-10  2:52 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2021-05-10  2:52 UTC (permalink / raw)
  To: Lu, Wenzhuo, dev; +Cc: Lu, Wenzhuo



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Wenzhuo Lu
> Sent: Monday, May 10, 2021 9:33 AM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Subject: [dpdk-dev] [PATCH] net/iavf: fix coverity issue
> 
> The coverity issue,
> "CID 370606:  Control flow issues  (DEADCODE) Execution cannot reach the
> expression "use_avx2"
> inside this statement: "if (!use_sse && !use_avx2 &..."."
> 
> After commit bb3ef9aaa478, the check is useless.
> 
> Fixes: bb3ef9aaa478 ("net/iavf: fix Rx function selection")

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

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

end of thread, other threads:[~2021-05-10  2:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10  1:32 [dpdk-dev] [PATCH] net/iavf: fix coverity issue Wenzhuo Lu
2021-05-10  2:52 ` Zhang, Qi Z

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.