udp: remove a useless initialization
Subsystems (3)
PATCH 1/1 udp: remove a useless initialization
'inner_eth' is not used until it is assigned with the same value later.
Cc Eric Dumazet <[email protected]>
Cc Pravin B Shelar <[email protected]>
Cc David S. Miller <[email protected]>
Signed-off-by Cong Wang <[email protected]>
---
net/ipv4/udp.c +1 -1
@@ -2311,7 +2311,7 @@ static struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb,struct sk_buff *segs =ERR_PTR (-EINVAL );int mac_len = skb->mac_len;int tnl_hlen =skb_inner_mac_header (skb) -skb_transport_header (skb); -struct ethhdr *inner_eth = (struct ethhdr *)skb_inner_mac_header (skb); +struct ethhdr *inner_eth;__be16 protocol = skb->protocol;netdev_features_t enc_features;int outer_hlen;
Quoted 3 lines · Cong Wang
'
inner_eth' is not used until it is assigned with the same value later.
since you are at this code, can you also pull inner ether header?
Thanks,
Pravin.
Quoted 19 lines
Cc Eric Dumazet <[email protected]>Cc Pravin B Shelar <[email protected]>Cc David S. Miller <[email protected]>Signed-off-by Cong Wang <[email protected]>---
net/ipv4/udp.c +1
-1@@ -2311,7 +2311,7 @@ static struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb,struct sk_buff *segs =ERR_PTR (-EINVAL );int mac_len = skb->mac_len;int tnl_hlen =skb_inner_mac_header (skb) -skb_transport_header (skb); -struct ethhdr *inner_eth = (struct ethhdr *)skb_inner_mac_header (skb); +struct ethhdr *inner_eth;__be16 protocol = skb->protocol;netdev_features_t enc_features;int outer_hlen;