Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932600AbdHWSqO (ORCPT ); Wed, 23 Aug 2017 14:46:14 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:46694 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932458AbdHWSqM (ORCPT ); Wed, 23 Aug 2017 14:46:12 -0400 Date: Wed, 23 Aug 2017 11:46:11 -0700 (PDT) Message-Id: <20170823.114611.1764472622798498530.davem@davemloft.net> To: colin.king@canonical.com Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][netdev-next] gre: remove duplicated assignment of iph From: David Miller In-Reply-To: <20170823111305.19185-1-colin.king@canonical.com> References: <20170823111305.19185-1-colin.king@canonical.com> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 23 Aug 2017 11:46:12 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 665 Lines: 22 From: Colin King Date: Wed, 23 Aug 2017 12:13:05 +0100 > From: Colin Ian King > > 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 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.