Skip to contentSkip to conversation

net/bnx2x: fix warnings from invalid assert

PATCH In review Stephen Hemminger 5 participants 8 messages Jun 19, 2019 – Jun 24, 2019 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 net/bnx2x: fix warnings from invalid assert

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")
---
 drivers/net/bnx2x/bnx2x_ethdev.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/bnx2x/bnx2x_ethdev.c +0 -1
index 45c6c363c077..0ee35e4e4d8e 100644
@@ -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");
 		}
 	}
 }
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 net/qede: fix warnings from invalid assert

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")
---
 drivers/net/qede/qede_ethdev.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/qede/qede_ethdev.c +0 -1
index 84d898421bd4..82363e6eba93 100644
@@ -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");
 	}
 }
 
Signature · 1 line
2.20.1
Acked-by on v1 2/2
#2 lore raw

Re: [dpdk-dev] [PATCH 2/2] net/qede: fix warnings from invalid assert

Quoted 28 lines

From: dev [mailto:[email protected]] 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")
---
 drivers/net/qede/qede_ethdev.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/qede/qede_ethdev.c +0 -2
index 84d898421bd4..82363e6eba93 100644
@@ -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");
 	}
 }
 
--
Quoted 2 lines

2.20.1

Acked-by on v1 2/2
#3 lore raw

Re: [dpdk-dev] [PATCH 2/2] net/qede: fix warnings from invalid assert

In reply to Stephen Hemminger
Quoted 28 lines

From: dev [mailto:[email protected]] 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")
---
 drivers/net/qede/qede_ethdev.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/qede/qede_ethdev.c +0 -2
index 84d898421bd4..82363e6eba93 100644
@@ -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");
 	}
 }
 
--
Quoted 2 lines

2.20.1

Acked-by on v1 1/2
#4 lore raw
In reply to Stephen Hemminger
Quoted 11 lines

From: dev <[email protected]> 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")

---

For both patches,

Acked-by on v1 1/2
#5 lore raw
In reply to Stephen Hemminger
Quoted 28 lines

From: dev [mailto:[email protected]] 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")
---
 drivers/net/bnx2x/bnx2x_ethdev.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/bnx2x/bnx2x_ethdev.c +0 -2
index 45c6c363c077..0ee35e4e4d8e 100644
@@ -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");
 		}
 	}
 }
--
Quoted 2 lines

2.20.1

#6 lore raw
Quoted 8 lines · Morten Brørup
Quoted 8 lines

From: dev [mailto:[email protected]] 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.

Quoted 5 lines
Quoted 2 lines
Fixes 6041aa619f9a ("net/bnx2x: fix poll link status")

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

@Thomas, Can we pull them to main repo quickly, to prevent the build error?

#7 lore raw

24/06/2019 13:31, Ferruh Yigit:

Quoted 12 lines · Morten Brørup
Quoted 11 lines
Quoted 10 lines

From: dev [mailto:[email protected]] 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")
Quoted 7 lines
Quoted 2 lines

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