public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netvsc: Remove redundant use of ipv6_hdr()
@ 2017-07-19 13:19 Mohammed Gamal
  2017-07-19 15:19 ` Haiyang Zhang
  2017-07-19 16:44 ` Stephen Hemminger
  0 siblings, 2 replies; 7+ messages in thread
From: Mohammed Gamal @ 2017-07-19 13:19 UTC (permalink / raw)
  To: kys, haiyangz, sthemmin
  Cc: devel, linux-kernel, vkuznets, cavery, otubo, Mohammed Gamal

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-07-19 19:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-19 13:19 [PATCH] netvsc: Remove redundant use of ipv6_hdr() Mohammed Gamal
2017-07-19 15:19 ` Haiyang Zhang
2017-07-19 16:44 ` Stephen Hemminger
2017-07-19 17:48   ` Mohammed Gamal
2017-07-19 17:59     ` Stephen Hemminger
2017-07-19 18:52     ` Haiyang Zhang
2017-07-19 19:10     ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox