Skip to contentSkip to conversation

net-ipv6: remove unused IP6_ECN_clear() function

PATCH Applied Maciej Żenczykowski 2 participants 2 messages Sep 27, 2017 – Sep 28, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net-ipv6: remove unused IP6_ECN_clear() function

From: Maciej Żenczykowski <[email protected]>

This function is unused, and furthermore it is buggy since it suffers from the same issue that requires IP6_ECN_set_ce() to take a pointer to the skb so that it may (in case of CHECKSUM_COMPLETE) update skb->csum

Instead of fixing it, let's just outright remove it.

Tested: builds, and 'git grep IP6_ECN_clear' comes up empty

---
 include/net/inet_ecn.h | 5 -----
 1 file changed, 5 deletions(-)
include/net/inet_ecn.h +0 -5
index dce2d586d9ce..f5ff16d72fe6 100644
@@ -133,11 +133,6 @@ static inline int IP6_ECN_set_ce(struct sk_buff *skb, struct ipv6hdr *iph)
 	return 1;
 }
 
-static inline void IP6_ECN_clear(struct ipv6hdr *iph)
-{
-	*(__be32*)iph &= ~htonl(INET_ECN_MASK << 20);
-}
-
 static inline void ipv6_copy_dscp(unsigned int dscp, struct ipv6hdr *inner)
 {
 	dscp &= ~INET_ECN_MASK;
Signature · 1 line
2.14.1.992.g2c7b836f3a-goog
maintainer Applied
#1 lore raw

From: Maciej Żenczykowski <[email protected]>
Date: Tue, 26 Sep 2017 20:37:22 -0700

Quoted 11 lines

From: Maciej Żenczykowski <[email protected]>

This function is unused, and furthermore it is buggy since it suffers from the same issue that requires IP6_ECN_set_ce() to take a pointer to the skb so that it may (in case of CHECKSUM_COMPLETE) update skb->csum

Instead of fixing it, let's just outright remove it.

Tested: builds, and 'git grep IP6_ECN_clear' comes up empty

Applied to net-next.