baseband/acc100: remove logically dead code
diff mbox series

Message ID 1603141797-230055-2-git-send-email-nicolas.chautru@intel.com
State Accepted
Delegated to: akhil goyal
Headers show
Series
  • baseband/acc100: remove logically dead code
Related show

Checks

Context Check Description
ci/travis-robot success Travis build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Chautru, Nicolas Oct. 19, 2020, 9:09 p.m. UTC
Coverity reported dead code for a few error
checks which are indeed not reachable.

Coverity issue: 363451, 363454, 363455

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 drivers/baseband/acc100/rte_acc100_pmd.c | 9 ---------
 1 file changed, 9 deletions(-)

Comments

Tom Rix Oct. 21, 2020, 1:58 p.m. UTC | #1
On 10/19/20 2:09 PM, Nicolas Chautru wrote:
> Coverity reported dead code for a few error
> checks which are indeed not reachable.
>
> Coverity issue: 363451, 363454, 363455
>
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>

This change looks fine.

Should remove the 'Coverity issue: ... ' from the log.

Reviewed-by: Tom Rix <trix@redhat.com>

> ---
>  drivers/baseband/acc100/rte_acc100_pmd.c | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
> index 47ddbae..5e663a6 100644
> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> @@ -2519,9 +2519,6 @@
>  		r++;
>  	}
>  
> -	if (unlikely(desc == NULL))
> -		return current_enqueued_cbs;
> -
>  #ifdef RTE_LIBRTE_BBDEV_DEBUG
>  	if (check_mbuf_total_left(mbuf_total_left) != 0)
>  		return -EINVAL;
> @@ -3076,9 +3073,6 @@
>  		r++;
>  	}
>  
> -	if (unlikely(desc == NULL))
> -		return current_enqueued_cbs;
> -
>  #ifdef RTE_LIBRTE_BBDEV_DEBUG
>  	if (check_mbuf_total_left(mbuf_total_left) != 0)
>  		return -EINVAL;
> @@ -3181,9 +3175,6 @@
>  		r++;
>  	}
>  
> -	if (unlikely(desc == NULL))
> -		return current_enqueued_cbs;
> -
>  #ifdef RTE_LIBRTE_BBDEV_DEBUG
>  	if (check_mbuf_total_left(mbuf_total_left) != 0)
>  		return -EINVAL;
Mcnamara, John Oct. 26, 2020, 12:03 p.m. UTC | #2
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Tom Rix
> Sent: Wednesday, October 21, 2020 2:58 PM
> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org;
> akhil.goyal@nxp.com
> Cc: Richardson, Bruce <bruce.richardson@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] baseband/acc100: remove logically dead
> code
> 
> 
> On 10/19/20 2:09 PM, Nicolas Chautru wrote:
> > Coverity reported dead code for a few error checks which are indeed
> > not reachable.
> >
> > Coverity issue: 363451, 363454, 363455
> >
> > Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> 
> This change looks fine.
> 
> Should remove the 'Coverity issue: ... ' from the log.
> 
> Reviewed-by: Tom Rix <trix@redhat.com>

It should stay. That is the convention we use:

    git log | grep "Coverity issue"
Akhil Goyal Oct. 28, 2020, 11:32 a.m. UTC | #3
> 
> On 10/19/20 2:09 PM, Nicolas Chautru wrote:
> > Coverity reported dead code for a few error
> > checks which are indeed not reachable.
> >
> > Coverity issue: 363451, 363454, 363455
> >
> > Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> 
> This change looks fine.
> 
> Should remove the 'Coverity issue: ... ' from the log.
> 
> Reviewed-by: Tom Rix <trix@redhat.com>
> 
Applied to dpdk-next-crypto

Thanks.

Patch
diff mbox series

diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 47ddbae..5e663a6 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -2519,9 +2519,6 @@ 
 		r++;
 	}
 
-	if (unlikely(desc == NULL))
-		return current_enqueued_cbs;
-
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
 	if (check_mbuf_total_left(mbuf_total_left) != 0)
 		return -EINVAL;
@@ -3076,9 +3073,6 @@ 
 		r++;
 	}
 
-	if (unlikely(desc == NULL))
-		return current_enqueued_cbs;
-
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
 	if (check_mbuf_total_left(mbuf_total_left) != 0)
 		return -EINVAL;
@@ -3181,9 +3175,6 @@ 
 		r++;
 	}
 
-	if (unlikely(desc == NULL))
-		return current_enqueued_cbs;
-
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
 	if (check_mbuf_total_left(mbuf_total_left) != 0)
 		return -EINVAL;