summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJason Xing <kernelxing@tencent.com>2024-05-31 17:46:34 +0200
committerDavid S. Miller <davem@davemloft.net>2024-06-05 11:06:00 +0200
commit61e2bbafb00e4b9a5de45e6448a7b6b818658576 (patch)
tree8ded17de35ad06ef9aca2201dd5b1ef93b562e14 /include/net
parentnet: bridge: fix an inconsistent indentation (diff)
downloadlinux-61e2bbafb00e4b9a5de45e6448a7b6b818658576.tar.xz
linux-61e2bbafb00e4b9a5de45e6448a7b6b818658576.zip
net: remove NULL-pointer net parameter in ip_metrics_convert
When I was doing some experiments, I found that when using the first parameter, namely, struct net, in ip_metrics_convert() always triggers NULL pointer crash. Then I digged into this part, realizing that we can remove this one due to its uselessness. Signed-off-by: Jason Xing <kernelxing@tencent.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ip.h3
-rw-r--r--include/net/tcp.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index 6d735e00d3f3..c5606cadb1a5 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -506,8 +506,7 @@ static inline unsigned int ip_skb_dst_mtu(struct sock *sk,
return mtu - lwtunnel_headroom(skb_dst(skb)->lwtstate, mtu);
}
-struct dst_metrics *ip_fib_metrics_init(struct net *net, struct nlattr *fc_mx,
- int fc_mx_len,
+struct dst_metrics *ip_fib_metrics_init(struct nlattr *fc_mx, int fc_mx_len,
struct netlink_ext_ack *extack);
static inline void ip_fib_metrics_put(struct dst_metrics *fib_metrics)
{
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 08c3b99501cf..a70fc39090fe 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1224,7 +1224,7 @@ extern struct tcp_congestion_ops tcp_reno;
struct tcp_congestion_ops *tcp_ca_find(const char *name);
struct tcp_congestion_ops *tcp_ca_find_key(u32 key);
-u32 tcp_ca_get_key_by_name(struct net *net, const char *name, bool *ecn_ca);
+u32 tcp_ca_get_key_by_name(const char *name, bool *ecn_ca);
#ifdef CONFIG_INET
char *tcp_ca_get_name_by_key(u32 key, char *buffer);
#else