[2/2] net/qede: fix warnings from invalid assert
diff mbox series

Message ID 20190619182217.8482-2-stephen@networkplumber.org
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • Untitled series #5089
Related show

Checks

Context Check Description
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger June 19, 2019, 6:22 p.m. UTC
This driver had a bogus assert which could never happen.
This triggers "expression is always false warnings" with some
compilers which causes build failure.
Just remove it.

Fixes: 2af14ca79c0a ("net/qede: support 100G")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/qede/qede_ethdev.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Morten Brørup June 24, 2019, 9:23 a.m. UTC | #1
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen Hemminger
> Sent: Wednesday, June 19, 2019 8:22 PM
> 
> This driver had a bogus assert which could never happen.
> This triggers "expression is always false warnings" with some
> compilers which causes build failure.
> Just remove it.
> 
> Fixes: 2af14ca79c0a ("net/qede: support 100G")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  drivers/net/qede/qede_ethdev.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/qede/qede_ethdev.c
> b/drivers/net/qede/qede_ethdev.c
> index 84d898421bd4..82363e6eba93 100644
> --- a/drivers/net/qede/qede_ethdev.c
> +++ b/drivers/net/qede/qede_ethdev.c
> @@ -1426,7 +1426,6 @@ static void qede_poll_sp_sb_cb(void *param)
>  	if (rc != 0) {
>  		DP_ERR(edev, "Unable to start periodic"
>  			     " timer rc %d\n", rc);
> -		assert(false && "Unable to start periodic timer");
>  	}
>  }
> 
> --
> 2.20.1
> 

Acked-by: Morten Brørup <mb@smartsharesystems.com>
Morten Brørup June 24, 2019, 9:24 a.m. UTC | #2
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen Hemminger
> Sent: Wednesday, June 19, 2019 8:22 PM
> 
> This driver had a bogus assert which could never happen.
> This triggers "expression is always false warnings" with some
> compilers which causes build failure.
> Just remove it.
> 
> Fixes: 2af14ca79c0a ("net/qede: support 100G")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  drivers/net/qede/qede_ethdev.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/qede/qede_ethdev.c
> b/drivers/net/qede/qede_ethdev.c
> index 84d898421bd4..82363e6eba93 100644
> --- a/drivers/net/qede/qede_ethdev.c
> +++ b/drivers/net/qede/qede_ethdev.c
> @@ -1426,7 +1426,6 @@ static void qede_poll_sp_sb_cb(void *param)
>  	if (rc != 0) {
>  		DP_ERR(edev, "Unable to start periodic"
>  			     " timer rc %d\n", rc);
> -		assert(false && "Unable to start periodic timer");
>  	}
>  }
> 
> --
> 2.20.1
> 

Acked-by: Morten Brørup <mb@smartsharesystems.com>

Patch
diff mbox series

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 84d898421bd4..82363e6eba93 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1426,7 +1426,6 @@  static void qede_poll_sp_sb_cb(void *param)
 	if (rc != 0) {
 		DP_ERR(edev, "Unable to start periodic"
 			     " timer rc %d\n", rc);
-		assert(false && "Unable to start periodic timer");
 	}
 }