[1/2] net/bnx2x: fix warnings from invalid assert

Message ID 20190619182217.8482-1-stephen@networkplumber.org (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [1/2] net/bnx2x: fix warnings from invalid assert |

Checks

Context Check Description
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-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: 6041aa619f9a ("net/bnx2x: fix poll link status")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/bnx2x/bnx2x_ethdev.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Rasesh Mody June 19, 2019, 10:56 p.m. UTC | #1
>From: dev <dev-bounces@dpdk.org> On Behalf Of Stephen Hemminger
>Sent: Wednesday, June 19, 2019 11:22 AM
>
>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: 6041aa619f9a ("net/bnx2x: fix poll link status")
>Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>---

For both patches,

Acked-by: Rasesh Mody <rmody@marvell.com>
  
Morten Brørup June 24, 2019, 9:25 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: 6041aa619f9a ("net/bnx2x: fix poll link status")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  drivers/net/bnx2x/bnx2x_ethdev.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c
> b/drivers/net/bnx2x/bnx2x_ethdev.c
> index 45c6c363c077..0ee35e4e4d8e 100644
> --- a/drivers/net/bnx2x/bnx2x_ethdev.c
> +++ b/drivers/net/bnx2x/bnx2x_ethdev.c
> @@ -150,7 +150,6 @@ static void bnx2x_periodic_start(void *param)
>  		if (ret) {
>  			PMD_DRV_LOG(ERR, sc, "Unable to start periodic"
>  					     " timer rc %d", ret);
> -			assert(false && "Unable to start periodic timer");
>  		}
>  	}
>  }
> --
> 2.20.1
> 

Acked-by: Morten Brørup <mb@smartsharesystems.com>
  
Ferruh Yigit June 24, 2019, 11:31 a.m. UTC | #3
On 6/24/2019 10:25 AM, Morten Brørup wrote:
>> 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: 6041aa619f9a ("net/bnx2x: fix poll link status")
>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> 
> Acked-by: Morten Brørup <mb@smartsharesystems.com>
> 

Series applied to dpdk-next-net/master, thanks.


@Thomas, Can we pull them to main repo quickly, to prevent the build error?
  
Thomas Monjalon June 24, 2019, 1:22 p.m. UTC | #4
24/06/2019 13:31, Ferruh Yigit:
> On 6/24/2019 10:25 AM, Morten Brørup wrote:
> >> 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: 6041aa619f9a ("net/bnx2x: fix poll link status")
> >> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > 
> > Acked-by: Morten Brørup <mb@smartsharesystems.com>
> > 
> 
> Series applied to dpdk-next-net/master, thanks.
> 
> 
> @Thomas, Can we pull them to main repo quickly, to prevent the build error?

Pushed in master, thanks
  

Patch

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 45c6c363c077..0ee35e4e4d8e 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -150,7 +150,6 @@  static void bnx2x_periodic_start(void *param)
 		if (ret) {
 			PMD_DRV_LOG(ERR, sc, "Unable to start periodic"
 					     " timer rc %d", ret);
-			assert(false && "Unable to start periodic timer");
 		}
 	}
 }