Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1691676

[PATCH] netvsc: Remove redundant use of ipv6_hdr()

From Mohammed Gamal <mgamal@redhat.com>
Newsgroups linux.kernel
Subject [PATCH] netvsc: Remove redundant use of ipv6_hdr()
Date 2017-07-19 15:30 +0200
Message-ID <u4Xd8-Hy-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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 <mgamal@redhat.com>
---
 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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] netvsc: Remove redundant use of ipv6_hdr() Mohammed Gamal <mgamal@redhat.com> - 2017-07-19 15:30 +0200
  RE: [PATCH] netvsc: Remove redundant use of ipv6_hdr() Haiyang Zhang <haiyangz@microsoft.com> - 2017-07-19 17:20 +0200
  Re: [PATCH] netvsc: Remove redundant use of ipv6_hdr() Stephen Hemminger <stephen@networkplumber.org> - 2017-07-19 18:50 +0200
    Re: [PATCH] netvsc: Remove redundant use of ipv6_hdr() Mohammed Gamal <mgamal@redhat.com> - 2017-07-19 19:50 +0200
      Re: [PATCH] netvsc: Remove redundant use of ipv6_hdr() Stephen Hemminger <stephen@networkplumber.org> - 2017-07-19 20:00 +0200
      RE: [PATCH] netvsc: Remove redundant use of ipv6_hdr() Haiyang Zhang <haiyangz@microsoft.com> - 2017-07-19 21:00 +0200
      Re: [PATCH] netvsc: Remove redundant use of ipv6_hdr() Dan Carpenter <dan.carpenter@oracle.com> - 2017-07-19 21:20 +0200

csiph-web