Skip to contentSkip to conversation

net: remove function sk_reset_txq()

PATCH In review ZHAO Gang 2 participants 2 messages Oct 20, 2013 – Oct 21, 2013

Subsystems (3)
lore
Share & tools
lore

ZHAO Gang

author
#0 lore raw

PATCH v2 1/1 net: remove function sk_reset_txq()

What sk_reset_txq() does is just calls function sk_tx_queue_reset(), and sk_reset_txq() is used only in sock.h, by dst_negative_advice(). Let dst_negative_advice() calls sk_tx_queue_reset() directly so we can remove unneeded sk_reset_txq().

change a typo in patch description: sock.c -> sock.h

---
 include/net/sock.h | 4 +---
 net/core/sock.c    | 6 ------
 2 files changed, 1 insertion(+), 9 deletions(-)
include/net/sock.h +1 -3
index 1d37a80..db66682 100644
@@ -1752,8 +1752,6 @@ sk_dst_get(struct sock *sk)
 	return dst;
 }
 
-extern void sk_reset_txq(struct sock *sk);
-
 static inline void dst_negative_advice(struct sock *sk)
 {
 	struct dst_entry *ndst, *dst = __sk_dst_get(sk);
@@ -1763,7 +1761,7 @@ static inline void dst_negative_advice(struct sock *sk)
 
 		if (ndst != dst) {
 			rcu_assign_pointer(sk->sk_dst_cache, ndst);
-			sk_reset_txq(sk);
+			sk_tx_queue_clear(sk);
 		}
 	}
 }
net/core/sock.c +0 -6
index 5b6beba..3f1545f 100644
@@ -475,12 +475,6 @@ discard_and_relse:
 }
 EXPORT_SYMBOL(sk_receive_skb);
 
-void sk_reset_txq(struct sock *sk)
-{
-	sk_tx_queue_clear(sk);
-}
-EXPORT_SYMBOL(sk_reset_txq);
-
 struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie)
 {
 	struct dst_entry *dst = __sk_dst_get(sk);
Signature · 1 line
1.8.3.1
maintainer
#1 lore raw

From: ZHAO Gang <[email protected]>
Date: Sun, 20 Oct 2013 09:37:57 +0800

Quoted 7 lines

What sk_reset_txq() does is just calls function sk_tx_queue_reset(), and sk_reset_txq() is used only in sock.h, by dst_negative_advice(). Let dst_negative_advice() calls sk_tx_queue_reset() directly so we can remove unneeded sk_reset_txq().

change a typo in patch description: sock.c -> sock.h

This patch does not apply cleanly to net-next, please fix this up and resubmit.

Thanks.