Skip to content

Commit

Permalink
net: constify sk_dst_get() and __sk_dst_get() argument
Browse files Browse the repository at this point in the history
[ Upstream commit 5033f58 ]

Both helpers only read fields from their socket argument.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Eric Dumazet authored and gregkh committed Jan 10, 2024
1 parent f797a2f commit 22c8e0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -2152,14 +2152,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;

Expand Down

0 comments on commit 22c8e0b

Please sign in to comment.