From: Colin King <hidden> Date: 2017-08-23 11:13:16
From: Colin Ian King <redacted>
iph is being assigned the same value twice; remove the redundant
second assignment.
Fixes warning:
net/ipv4/ip_gre.c:265:2: warning: Value stored to 'iph' is never read
Signed-off-by: Colin Ian King <redacted>
---
net/ipv4/ip_gre.c | 1 -
1 file changed, 1 deletion(-)
@@ -268,7 +268,6 @@ static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi,if(unlikely(!pskb_may_pull(skb,len)))return-ENOMEM;-iph=ip_hdr(skb);ershdr=(structerspanhdr*)(skb->data+gre_hdr_len);/* The original GRE header does not have key field,
From: Nikolay Aleksandrov <hidden> Date: 2017-08-23 11:52:31
On 23/08/17 14:13, Colin King wrote:
quoted hunk
From: Colin Ian King <redacted>
iph is being assigned the same value twice; remove the redundant
second assignment.
Fixes warning:
net/ipv4/ip_gre.c:265:2: warning: Value stored to 'iph' is never read
Signed-off-by: Colin Ian King <redacted>
---
net/ipv4/ip_gre.c | 1 -
1 file changed, 1 deletion(-)
@@ -268,7 +268,6 @@ static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi,if(unlikely(!pskb_may_pull(skb,len)))return-ENOMEM;-iph=ip_hdr(skb);ershdr=(structerspanhdr*)(skb->data+gre_hdr_len);/* The original GRE header does not have key field,
This one looks like a correct assignment, I'd remove the previous one because
pskb_may_pull may change the header pointers and the previously assigned iph might
become wrong.
Also add the author of the code to the CC list.
From: David Miller <davem@davemloft.net> Date: 2017-08-23 18:46:14
From: Colin King <redacted>
Date: Wed, 23 Aug 2017 12:13:05 +0100
From: Colin Ian King <redacted>
iph is being assigned the same value twice; remove the redundant
second assignment.
Fixes warning:
net/ipv4/ip_gre.c:265:2: warning: Value stored to 'iph' is never read
Signed-off-by: Colin Ian King <redacted>
It is always necessary to reload any SKB header pointer after calls
to functions which potentially change the data buffer of the SKB.
pskb_may_pull() is one such call.
Therefore your patch is adding a bug.
If you want to remove the dup, you must remove the first not
the second one.