All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch net] udp: remove a useless initialization
@ 2013-05-08  3:04 Cong Wang
  2013-05-08  4:17 ` Pravin Shelar
  0 siblings, 1 reply; 2+ messages in thread
From: Cong Wang @ 2013-05-08  3:04 UTC (permalink / raw)
  To: netdev; +Cc: Eric Dumazet, Pravin B Shelar, David S. Miller, Cong Wang

'inner_eth' is not used until it is assigned with the same
value later.

Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Pravin B Shelar <pshelar@nicira.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>

---
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 0ae038a..3d036bdd 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch net] udp: remove a useless initialization
  2013-05-08  3:04 [Patch net] udp: remove a useless initialization Cong Wang
@ 2013-05-08  4:17 ` Pravin Shelar
  0 siblings, 0 replies; 2+ messages in thread
From: Pravin Shelar @ 2013-05-08  4:17 UTC (permalink / raw)
  To: Cong Wang; +Cc: netdev, Eric Dumazet, David S. Miller

On Tue, May 7, 2013 at 8:04 PM, Cong Wang <amwang@redhat.com> wrote:
> '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.
> Cc: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Pravin B Shelar <pshelar@nicira.com>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Cong Wang <amwang@redhat.com>
>
> ---
> diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
> index 0ae038a..3d036bdd 100644
> --- a/net/ipv4/udp.c
> +++ b/net/ipv4/udp.c
> @@ -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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-08  4:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-08  3:04 [Patch net] udp: remove a useless initialization Cong Wang
2013-05-08  4:17 ` Pravin Shelar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.