Skip to contentSkip to conversation

vmxnet3: remove asserts that confuse coverity

PATCH Applied Stephen Hemminger 3 participants 3 messages Mar 30, 2016 – Mar 31, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vmxnet3: remove asserts that confuse coverity

These asserts are only for debugging and never fired during any testing, but they confuse coverity's null tracking.

---
 drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/vmxnet3/vmxnet3_rxtx.c +0 -2
index 66b0eed..f72156a 100644
@@ -710,7 +710,6 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		 * the last mbuf of the current packet.
 		 */
 		if (rcd->sop) {
-			VMXNET3_ASSERT(rxq->start_seg != NULL);
 			VMXNET3_ASSERT(rxd->btype == VMXNET3_RXD_BTYPE_HEAD);
 
 			if (unlikely(rcd->len == 0)) {
@@ -729,7 +728,6 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 			struct rte_mbuf *start = rxq->start_seg;
 
 			VMXNET3_ASSERT(rxd->btype == VMXNET3_RXD_BTYPE_BODY);
-			VMXNET3_ASSERT(start != NULL);
 
 			start->pkt_len += rxm->data_len;
 			start->nb_segs++;
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Stephen Hemminger

These asserts are only for debugging and never fired during any testing, but they confuse coverity's null tracking.

---

Quoted 26 lines

drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 --

1 file changed, 2 deletions(-)
drivers/net/vmxnet3/vmxnet3_rxtx.c +0 -2
index 66b0eed..f72156a 100644
@@ -710,7 +710,6 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		 * the last mbuf of the current packet.
 		 */
 		if (rcd->sop) {
-			VMXNET3_ASSERT(rxq->start_seg != NULL);
 			VMXNET3_ASSERT(rxd->btype == VMXNET3_RXD_BTYPE_HEAD);
 
 			if (unlikely(rcd->len == 0)) {
@@ -729,7 +728,6 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 			struct rte_mbuf *start = rxq->start_seg;
 
 			VMXNET3_ASSERT(rxd->btype == VMXNET3_RXD_BTYPE_BODY);
-			VMXNET3_ASSERT(start != NULL);
 
 			start->pkt_len += rxm->data_len;
 			start->nb_segs++;
Signature · 1 line
2.1.4