Skip to contentSkip to conversation

net: lio_core: remove redundant assignment to variable tx_done

PATCH Applied Colin King 2 participants 2 messages May 8, 2020 – May 9, 2020

Subsystems (4)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 net: lio_core: remove redundant assignment to variable tx_done

From: Colin Ian King <[email protected]>

The variable tx_done is being assigned with a value that is never read as the function returns a few statements later. The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/net/ethernet/cavium/liquidio/lio_core.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/cavium/liquidio/lio_core.c +0 -1
index d7e805749a5b..e40c64b79f66 100644
@@ -782,7 +782,6 @@ static int liquidio_napi_poll(struct napi_struct *napi, int budget)
 	if ((work_done < budget && tx_done) ||
 	    (iq && iq->pkt_in_done >= MAX_REG_CNT) ||
 	    (droq->pkt_count >= MAX_REG_CNT)) {
-		tx_done = 1;
 		napi_complete_done(napi, work_done);
 
 		octeon_enable_irq(droq->oct_dev, droq->q_no);
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 8 lines · On Fri, 8 May 2020 23:58:10 +0100 Colin King wrote:

From: Colin Ian King <[email protected]>

The variable tx_done is being assigned with a value that is never read as the function returns a few statements later. The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

Applied, thank you!