diff options
author | Eric Dumazet <edumazet@google.com> | 2024-03-29 15:49:31 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-04-02 06:27:08 +0200 |
commit | 58169ec9c40309541509181e068177eab72e6caa (patch) | |
tree | 53a9472288e6d7fcfc8e1d6b3cdfa296297166b1 /net/ipv4/tcp_timer.c | |
parent | Merge branch 'doc-netlink-add-hyperlinks-to-generated-docs' (diff) | |
download | linux-58169ec9c40309541509181e068177eab72e6caa.tar.xz linux-58169ec9c40309541509181e068177eab72e6caa.zip |
inet: preserve const qualifier in inet_csk()
We can change inet_csk() to propagate its argument const qualifier,
thanks to container_of_const().
We have to fix few places that had mistakes, like tcp_bound_rto().
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240329144931.295800-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r-- | net/ipv4/tcp_timer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index d1ad20ce1c8c..976db57b95d4 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@ -25,7 +25,7 @@ static u32 tcp_clamp_rto_to_user_timeout(const struct sock *sk) { - struct inet_connection_sock *icsk = inet_csk(sk); + const struct inet_connection_sock *icsk = inet_csk(sk); const struct tcp_sock *tp = tcp_sk(sk); u32 elapsed, user_timeout; s32 remaining; @@ -47,7 +47,7 @@ static u32 tcp_clamp_rto_to_user_timeout(const struct sock *sk) u32 tcp_clamp_probe0_to_user_timeout(const struct sock *sk, u32 when) { - struct inet_connection_sock *icsk = inet_csk(sk); + const struct inet_connection_sock *icsk = inet_csk(sk); u32 remaining, user_timeout; s32 elapsed; |