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
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Oct 1, 2023
1 parent 236f387 commit 5033f58
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 @@ -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;

Expand Down

0 comments on commit 5033f58

Please sign in to comment.