Skip to content

Commit

Permalink
tcp: constify tcp_rto_min() and tcp_rto_min_us() argument
Browse files Browse the repository at this point in the history
Make clear these functions do not change any field from TCP socket.

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 5033f58 commit f68a181
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ static inline void tcp_fast_path_check(struct sock *sk)
}

/* Compute the actual rto_min value */
static inline u32 tcp_rto_min(struct sock *sk)
static inline u32 tcp_rto_min(const struct sock *sk)
{
const struct dst_entry *dst = __sk_dst_get(sk);
u32 rto_min = inet_csk(sk)->icsk_rto_min;
Expand All @@ -729,7 +729,7 @@ static inline u32 tcp_rto_min(struct sock *sk)
return rto_min;
}

static inline u32 tcp_rto_min_us(struct sock *sk)
static inline u32 tcp_rto_min_us(const struct sock *sk)
{
return jiffies_to_usecs(tcp_rto_min(sk));
}
Expand Down

0 comments on commit f68a181

Please sign in to comment.