tcp: constify tcp_rto_min() and tcp_rto_min_us() argument
[ Upstream patch f68a181fcd3b6a22236794813d5c9e5a62efd2b4 ]
Make clear these functions do not change any field from TCP socket.
BUG=b/345799473
TEST=presubmit
RELEASE_NOTE=None
cos-patch: bug
Change-Id: Ibfca7576e812120cba0521ff26bd1200ddc36aae
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/74714
Reviewed-by: Arnav Kansal <rnv@google.com>
Reviewed-by: Kevin Berry <kpberry@google.com>
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Main-Branch-Verified: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
diff --git a/include/net/tcp.h b/include/net/tcp.h
index df06e48..1811158 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -736,7 +736,7 @@ static inline void tcp_fast_path_check(struct sock *sk)
u32 tcp_delack_max(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;
@@ -746,7 +746,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));
}