From: Eric Dumazet Date: Wed, 20 Sep 2023 17:29:41 +0000 (+0000) Subject: net: constify sk_dst_get() and __sk_dst_get() argument X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5033f58d5feed1040eebeadb0c5efc95b8bf5720;p=linux.git net: constify sk_dst_get() and __sk_dst_get() argument Both helpers only read fields from their socket argument. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/include/net/sock.h b/include/net/sock.h index 56ac1abadea59..2800d587b08dd 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -2141,14 +2141,14 @@ static inline bool sk_rethink_txhash(struct sock *sk) } static inline struct dst_entry * -__sk_dst_get(struct sock *sk) +__sk_dst_get(const struct sock *sk) { return rcu_dereference_check(sk->sk_dst_cache, lockdep_sock_is_held(sk)); } static inline struct dst_entry * -sk_dst_get(struct sock *sk) +sk_dst_get(const struct sock *sk) { struct dst_entry *dst;