Skip to contentSkip to conversation

ethernet: alteon: remove unused variable len

PATCH In review Colin Ian King 2 participants 2 messages Nov 4, 2022 – Nov 7, 2022

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

PATCH 1/1 ethernet: alteon: remove unused variable len

Variable len is being used to accumulate the skb_frag_size but it is never used afterwards. The variable is redundant and can be removed.

---
 drivers/net/ethernet/alteon/acenic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/alteon/acenic.c +1 -2
index d7762da8b2c0..eafef84fe3be 100644
@@ -2435,7 +2435,7 @@ static netdev_tx_t ace_start_xmit(struct sk_buff *skb,
 	} else {
 		dma_addr_t mapping;
 		u32 vlan_tag = 0;
-		int i, len = 0;
+		int i;
 
 		mapping = ace_map_tx_skb(ap, skb, NULL, idx);
 		flagsize = (skb_headlen(skb) << 16);
@@ -2454,7 +2454,6 @@ static netdev_tx_t ace_start_xmit(struct sk_buff *skb,
 			const skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
 			struct tx_ring_info *info;
 
-			len += skb_frag_size(frag);
 			info = ap->skb->tx_skbuff + idx;
 			desc = ap->tx_ring + idx;
 
Signature · 1 line
2.38.1
#1 lore raw
Quoted 8 lines · Colin Ian King

Variable len is being used to accumulate the skb_frag_size but it is never used afterwards. The variable is redundant and can be removed.

---
 drivers/net/ethernet/alteon/acenic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

net patches should have target in their title "[PATCH net-next] ...". It is applicable to all your net patches.

Thanks