Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753867AbdGSNT5 (ORCPT ); Wed, 19 Jul 2017 09:19:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55740 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753435AbdGSNTz (ORCPT ); Wed, 19 Jul 2017 09:19:55 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 717833B71F Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=mgamal@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 717833B71F From: Mohammed Gamal To: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com Cc: devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, vkuznets@redhat.com, cavery@redhat.com, otubo@redhat.com, Mohammed Gamal Subject: [PATCH] netvsc: Remove redundant use of ipv6_hdr() Date: Wed, 19 Jul 2017 15:19:28 +0200 Message-Id: <20170719131928.18209-1-mgamal@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 19 Jul 2017 13:19:55 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 741 Lines: 23 This condition already uses an object of type ipv6hdr in the line above. Use the object directly instead of calling ipv6_hdr Signed-off-by: Mohammed Gamal --- drivers/net/hyperv/netvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 63c98bb..06d591c 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -339,7 +339,7 @@ static u32 net_checksum_info(struct sk_buff *skb) if (ip6->nexthdr == IPPROTO_TCP) return TRANSPORT_INFO_IPV6_TCP; - else if (ipv6_hdr(skb)->nexthdr == IPPROTO_UDP) + else if (ip6->nexthdr == IPPROTO_UDP) return TRANSPORT_INFO_IPV6_UDP; } -- 2.9.4