All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][V2][netdev-next] gre: remove duplicated assignment of iph
@ 2017-08-23 11:59 Colin King
  2017-08-23 12:26 ` Nikolay Aleksandrov
  2017-08-24  5:36 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2017-08-23 11:59 UTC (permalink / raw)
  To: William Tu, David S . Miller, Alexey Kuznetsov,
	Hideaki YOSHIFUJI, netdev
  Cc: linux-kernel

From: Colin Ian King <colin.king@canonical.com>

iph is being assigned the same value twice; remove the redundant
first assignment. (Thanks to Nikolay Aleksandrov for pointing out
that the first asssignment should be removed and not the second)

Fixes warning:
net/ipv4/ip_gre.c:265:2: warning: Value stored to 'iph' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 net/ipv4/ip_gre.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 6e8a62289e03..161326f7f10b 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -262,7 +262,6 @@ static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi,
 	int len;
 
 	itn = net_generic(net, erspan_net_id);
-	iph = ip_hdr(skb);
 	len = gre_hdr_len + sizeof(*ershdr);
 
 	if (unlikely(!pskb_may_pull(skb, len)))
-- 
2.14.1

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

* Re: [PATCH][V2][netdev-next] gre: remove duplicated assignment of iph
  2017-08-23 11:59 [PATCH][V2][netdev-next] gre: remove duplicated assignment of iph Colin King
@ 2017-08-23 12:26 ` Nikolay Aleksandrov
  2017-08-24  5:36 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Nikolay Aleksandrov @ 2017-08-23 12:26 UTC (permalink / raw)
  To: Colin King, William Tu, David S . Miller, Alexey Kuznetsov,
	Hideaki YOSHIFUJI, netdev
  Cc: linux-kernel

On 23/08/17 14:59, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> iph is being assigned the same value twice; remove the redundant
> first assignment. (Thanks to Nikolay Aleksandrov for pointing out
> that the first asssignment should be removed and not the second)
> 
> Fixes warning:
> net/ipv4/ip_gre.c:265:2: warning: Value stored to 'iph' is never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  net/ipv4/ip_gre.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
> index 6e8a62289e03..161326f7f10b 100644
> --- a/net/ipv4/ip_gre.c
> +++ b/net/ipv4/ip_gre.c
> @@ -262,7 +262,6 @@ static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi,
>  	int len;
>  
>  	itn = net_generic(net, erspan_net_id);
> -	iph = ip_hdr(skb);
>  	len = gre_hdr_len + sizeof(*ershdr);
>  
>  	if (unlikely(!pskb_may_pull(skb, len)))
> 

LGTM,

Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>

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

* Re: [PATCH][V2][netdev-next] gre: remove duplicated assignment of iph
  2017-08-23 11:59 [PATCH][V2][netdev-next] gre: remove duplicated assignment of iph Colin King
  2017-08-23 12:26 ` Nikolay Aleksandrov
@ 2017-08-24  5:36 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-08-24  5:36 UTC (permalink / raw)
  To: colin.king; +Cc: u9012063, kuznet, yoshfuji, netdev, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Wed, 23 Aug 2017 12:59:48 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> iph is being assigned the same value twice; remove the redundant
> first assignment. (Thanks to Nikolay Aleksandrov for pointing out
> that the first asssignment should be removed and not the second)
> 
> Fixes warning:
> net/ipv4/ip_gre.c:265:2: warning: Value stored to 'iph' is never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Much better, applied, thanks.

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

end of thread, other threads:[~2017-08-24  5:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 11:59 [PATCH][V2][netdev-next] gre: remove duplicated assignment of iph Colin King
2017-08-23 12:26 ` Nikolay Aleksandrov
2017-08-24  5:36 ` David Miller

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.