diff mbox series

[v2,net-next] ipv4: remove useless arg

Message ID 20241205130454.3226-1-tianyu2@kernelsoft.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [v2,net-next] ipv4: remove useless arg | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 3 this patch: 3
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 4 maintainers not CCed: kuba@kernel.org horms@kernel.org edumazet@google.com dsahern@kernel.org
netdev/build_clang success Errors and warnings before: 3 this patch: 3
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 304 this patch: 304
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 41 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-12-06--18-00 (tests: 764)

Commit Message

tianyu2 Dec. 5, 2024, 1:04 p.m. UTC
The "struct sock *sk" parameter in ip_rcv_finish_core is unused, which
leads the compiler to optimize it out. As a result, the
"struct sk_buff *skb" parameter is passed using x1. And this make kprobe
hard to use.

Signed-off-by: tianyu2 <tianyu2@kernelsoft.com>
---
 net/ipv4/ip_input.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

Comments

Jakub Kicinski Dec. 8, 2024, 1:54 a.m. UTC | #1
On Thu,  5 Dec 2024 21:04:54 +0800 tianyu2 wrote:
> Signed-off-by: tianyu2 <tianyu2@kernelsoft.com>

As Paolo already pointed out the name portion of the sign off tag
should be the Anglicised(?) form of your name, not the repeat of
your login.
tianyu2 Dec. 9, 2024, 2:03 a.m. UTC | #2
> On Thu,  5 Dec 2024 21:04:54 +0800 tianyu2 wrote:
> > Signed-off-by: tianyu2 <tianyu2@kernelsoft.com>
> 
> As Paolo already pointed out the name portion of the sign off tag
> should be the Anglicised(?) form of your name, not the repeat of
> your login.
> -- 
> pw-bot: cr

Yes, it's fine with that name.
tianyu2 Dec. 25, 2024, 8:30 a.m. UTC | #3
> 
> 
> > On Thu,  5 Dec 2024 21:04:54 +0800 tianyu2 wrote:
> > > Signed-off-by: tianyu2 <tianyu2@kernelsoft.com>
> > 
> > As Paolo already pointed out the name portion of the sign off tag
> > should be the Anglicised(?) form of your name, not the repeat of
> > your login.
> > -- 
> > pw-bot: cr
> 
> Yes, it's fine with that name.
Any other problems with this patch?
Jakub Kicinski Dec. 27, 2024, 6:44 p.m. UTC | #4
On Wed, 25 Dec 2024 16:30:51 +0800 (GMT+08:00) tianyu2 wrote:
> > > As Paolo already pointed out the name portion of the sign off tag
> > > should be the Anglicised(?) form of your name, not the repeat of
> > > your login.
> > > -- 
> > > pw-bot: cr  
> > 
> > Yes, it's fine with that name.  
> Any other problems with this patch?

No other problems but you haven't fixed the problem we pointed out.
diff mbox series

Patch

diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
index f0a4dda246ab..30a5e9460d00 100644
--- a/net/ipv4/ip_input.c
+++ b/net/ipv4/ip_input.c
@@ -314,7 +314,7 @@  static bool ip_can_use_hint(const struct sk_buff *skb, const struct iphdr *iph,
 
 int tcp_v4_early_demux(struct sk_buff *skb);
 int udp_v4_early_demux(struct sk_buff *skb);
-static int ip_rcv_finish_core(struct net *net, struct sock *sk,
+static int ip_rcv_finish_core(struct net *net,
 			      struct sk_buff *skb, struct net_device *dev,
 			      const struct sk_buff *hint)
 {
@@ -442,7 +442,7 @@  static int ip_rcv_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
 	if (!skb)
 		return NET_RX_SUCCESS;
 
-	ret = ip_rcv_finish_core(net, sk, skb, dev, NULL);
+	ret = ip_rcv_finish_core(net, skb, dev, NULL);
 	if (ret != NET_RX_DROP)
 		ret = dst_input(skb);
 	return ret;
@@ -589,8 +589,7 @@  static struct sk_buff *ip_extract_route_hint(const struct net *net,
 	return skb;
 }
 
-static void ip_list_rcv_finish(struct net *net, struct sock *sk,
-			       struct list_head *head)
+static void ip_list_rcv_finish(struct net *net, struct list_head *head)
 {
 	struct sk_buff *skb, *next, *hint = NULL;
 	struct dst_entry *curr_dst = NULL;
@@ -607,7 +606,7 @@  static void ip_list_rcv_finish(struct net *net, struct sock *sk,
 		skb = l3mdev_ip_rcv(skb);
 		if (!skb)
 			continue;
-		if (ip_rcv_finish_core(net, sk, skb, dev, hint) == NET_RX_DROP)
+		if (ip_rcv_finish_core(net, skb, dev, hint) == NET_RX_DROP)
 			continue;
 
 		dst = skb_dst(skb);
@@ -633,7 +632,7 @@  static void ip_sublist_rcv(struct list_head *head, struct net_device *dev,
 {
 	NF_HOOK_LIST(NFPROTO_IPV4, NF_INET_PRE_ROUTING, net, NULL,
 		     head, dev, NULL, ip_rcv_finish);
-	ip_list_rcv_finish(net, NULL, head);
+	ip_list_rcv_finish(net, head);
 }
 
 /* Receive a list of IP packets */