[PATCH] atl1c: remove redundant assignment to variable tpd_req

Subsystems: atlx ethernet drivers, networking drivers, the rest

STALE2611d

2 messages, 2 authors, 2019-07-03 · open the first message on its own page

[PATCH] atl1c: remove redundant assignment to variable tpd_req

From: Colin King <hidden>
Date: 2019-07-03 07:54:03

From: Colin Ian King <redacted>

The variable tpd_req is being initialized with a value that is never
read and it is being updated later with a new value. The
initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <redacted>
---
 drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 25bf085324b8..be7f9cebb675 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -2201,7 +2201,7 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb,
 					  struct net_device *netdev)
 {
 	struct atl1c_adapter *adapter = netdev_priv(netdev);
-	u16 tpd_req = 1;
+	u16 tpd_req;
 	struct atl1c_tpd_desc *tpd;
 	enum atl1c_trans_queue type = atl1c_trans_normal;
 
-- 
2.20.1

Re: [PATCH] atl1c: remove redundant assignment to variable tpd_req

From: David Miller <davem@davemloft.net>
Date: 2019-07-03 18:32:54

From: Colin King <redacted>
Date: Wed,  3 Jul 2019 08:53:58 +0100
From: Colin Ian King <redacted>

The variable tpd_req is being initialized with a value that is never
read and it is being updated later with a new value. The
initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <redacted>
Applied to net-next.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help