DORMANTno replies

[PATCH net-next] net: cleanup __sk_stream_memory_free()

From: Eric Dumazet <hidden>
Date: 2021-10-28 01:12:14
Subsystem: networking [general], networking [sockets], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Kuniyuki Iwashima, Willem de Bruijn, Linus Torvalds

From: Eric Dumazet <edumazet@google.com>

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

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 include/net/sock.h | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/include/net/sock.h b/include/net/sock.h
index ff4e62aa62e51a68d086e9e2b8429cba5731be00..36d6321a587781fc1e058bae69eee27bc94a7b20 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -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)
-- 
2.33.0.1079.g6e70778dc9-goog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help