summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorJason Xing <kernelxing@tencent.com>2024-05-31 23:46:34 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-09-08 07:54:45 +0200
commit69f397e60c3be615c32142682d62fc0b6d5d5d67 (patch)
tree07b5f9dd9ba44680278a06cbcc1ed649343d04dd /include/net
parentfc1b1e135c3f72382f792e6c319fc088d5523ad5 (diff)
downloadlinux-69f397e60c3be615c32142682d62fc0b6d5d5d67.tar.gz
linux-69f397e60c3be615c32142682d62fc0b6d5d5d67.tar.bz2
linux-69f397e60c3be615c32142682d62fc0b6d5d5d67.zip
net: remove NULL-pointer net parameter in ip_metrics_convert
[ Upstream commit 61e2bbafb00e4b9a5de45e6448a7b6b818658576 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
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 162cf2d2f841..6f1ff4846451 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -497,8 +497,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 cc3b56bf19e0..c206ffaa8ed7 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1140,7 +1140,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