Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754060AbdHWM00 (ORCPT ); Wed, 23 Aug 2017 08:26:26 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:35193 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754034AbdHWM0X (ORCPT ); Wed, 23 Aug 2017 08:26:23 -0400 Subject: Re: [PATCH][V2][netdev-next] gre: remove duplicated assignment of iph To: Colin King , William Tu , "David S . Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , netdev@vger.kernel.org References: <20170823115948.19884-1-colin.king@canonical.com> Cc: linux-kernel@vger.kernel.org From: Nikolay Aleksandrov Message-ID: <6b9bc0fa-753f-5f85-d63a-dced94aa52cd@cumulusnetworks.com> Date: Wed, 23 Aug 2017 15:26:19 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170823115948.19884-1-colin.king@canonical.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 999 Lines: 32 On 23/08/17 14:59, Colin King wrote: > From: Colin Ian King > > 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 > --- > 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