Skip to contentSkip to conversation

net: cleanup __sk_stream_memory_free()

PATCH New Eric Dumazet 1 participant 1 message Oct 28, 2021

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

PATCH 1/1 net: cleanup __sk_stream_memory_free()

From: Eric Dumazet <[email protected]>

We now have INDIRECT_CALL_INET_1() macro, no need to use #ifdef CONFIG_INET

---
 include/net/sock.h | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
include/net/sock.h +2 -8
index ff4e62aa62e51a68d086e9e2b8429cba5731be00..36d6321a587781fc1e058bae69eee27bc94a7b20 100644
@@ -1299,15 +1299,9 @@ static inline bool __sk_stream_memory_free(const struct sock *sk, int wake)
 	if (READ_ONCE(sk->sk_wmem_queued) >= READ_ONCE(sk->sk_sndbuf))
 		return false;
 
-#ifdef CONFIG_INET
 	return sk->sk_prot->stream_memory_free ?
-		INDIRECT_CALL_1(sk->sk_prot->stream_memory_free,
-			        tcp_stream_memory_free,
-				sk, wake) : true;
-#else
-	return sk->sk_prot->stream_memory_free ?
-		sk->sk_prot->stream_memory_free(sk, wake) : true;
-#endif
+		INDIRECT_CALL_INET_1(sk->sk_prot->stream_memory_free,
+				     tcp_stream_memory_free, sk, wake) : true;
 }
 
 static inline bool sk_stream_memory_free(const struct sock *sk)
Signature · 1 line
2.33.0.1079.g6e70778dc9-goog