Skip to contentSkip to conversation

net/ulp: Remove redundant ->clone() test in inet_clone_ulp().

PATCH Applied Kuniyuki Iwashima 2 participants 2 messages Feb 17, 2023 – Feb 21, 2023

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

PATCH 1/1 net/ulp: Remove redundant ->clone() test in inet_clone_ulp().

Commit 2c02d41d71f9 ("net/ulp: prevent ULP without clone op from entering the LISTEN status") guarantees that all ULP listeners have clone() op, so we no longer need to test it in inet_clone_ulp().

---
 net/ipv4/inet_connection_sock.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/ipv4/inet_connection_sock.c +1 -2
index eedcf4146d29..65ad4251f6fd 100644
@@ -1122,8 +1122,7 @@ static void inet_clone_ulp(const struct request_sock *req, struct sock *newsk,
 	if (!icsk->icsk_ulp_ops)
 		return;
 
-	if (icsk->icsk_ulp_ops->clone)
-		icsk->icsk_ulp_ops->clone(req, newsk, priority);
+	icsk->icsk_ulp_ops->clone(req, newsk, priority);
 }
 
 /**
Signature · 1 line
2.30.2
#1 lore raw
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Fri, 17 Feb 2023 12:09:20 -0800 you wrote:

Commit 2c02d41d71f9 ("net/ulp: prevent ULP without clone op from entering the LISTEN status") guarantees that all ULP listeners have clone() op, so we no longer need to test it in inet_clone_ulp().

---
 net/ipv4/inet_connection_sock.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Here is the summary with links:
- [v1,net-next] net/ulp: Remove redundant ->clone() test in inet_clone_ulp().

    https://git.kernel.org/netdev/net-next/c/be9832c2e9cc

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html